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.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2013-10-13 17:56:55 -04:00
parent 97fec53e5e
commit f6d2d42147
+2 -1
View File
@@ -1860,7 +1860,8 @@ int config_parse_documentation(const char *unit,
free(*a);
}
}
*b = NULL;
if (b)
*b = NULL;
return r;
}