diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-10-12 13:43:07 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-10-13 17:56:55 -0400 |
commit | f6d2d421470a566cca05ceede788d61a0773e276 (patch) | |
tree | 77649e8a775d9243eff6e8a03f126129ff5edadf /src/core | |
parent | 97fec53e5e91222f43fc89d0ad45fa197742a363 (diff) |
Make sure that we don't dereference NULL
The code was actually safe, because b should
never be null, because if rvalue is empty, a different
branch is taken. But we *do* check for NULL in the
loop above, so it's better to also check here for symmetry.
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/load-fragment.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c index 44920d6449..f01843d65e 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -1860,7 +1860,8 @@ int config_parse_documentation(const char *unit, free(*a); } } - *b = NULL; + if (b) + *b = NULL; return r; } |