Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dir: Consistently initialize g_autofree variables
All g_autofree and g_autoptr variables should be initialized, either with a value or NULL, and some gcc versions warn if they are not. This particular instance was harmless, because we initialized regexp to either NULL or a valid non-NULL value as the first statement of the function, so there was no way to return before regexp was initialized; but if we introduced an early-return such as a g_return_val_if_fail before the current first statement, then that early return would have caused uninitialized stack contents to be freed, likely resulting in a crash. Signed-off-by: Simon McVittie <[email protected]>
- Loading branch information