path-util: set pointer to null after calling free()

In cases where path_strv_canonicalize() returns NULL, strv_free() is
called afterwards and it will call free() on pointers which were freed
already in path_strv_canonicalize()
This commit is contained in:
Michal Sekletar
2012-12-17 11:41:31 +01:00
committed by Zbigniew Jędrzejewski-Szmek
parent d1d7caeeee
commit c9c7aef24f
+1
View File
@@ -181,6 +181,7 @@ char **path_strv_canonicalize(char **l) {
t = path_make_absolute_cwd(*s);
free(*s);
*s = NULL;
if (!t) {
enomem = true;