Unverified Commit 12d06fa3 by Shukui Yang Committed by Stéphane Graber

Fix mem leak with realpath

parent c549cb11
...@@ -80,16 +80,11 @@ static int ensure_path(char **confpath, const char *path) ...@@ -80,16 +80,11 @@ static int ensure_path(char **confpath, const char *path)
goto err; goto err;
} }
*confpath = strdup(fullpath); *confpath = fullpath;
if (!*confpath) {
ERROR("failed to dup string '%s'", fullpath);
goto err;
}
} }
err = 0; err = 0;
err: err:
free(fullpath);
return err; return err;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment