Commit 065055b6 by Serge Hallyn Committed by GitHub

Merge pull request #1739 from keloyang/mem-leak

Fix mem leak with realpath
parents 42139323 e58e6e11
......@@ -80,16 +80,11 @@ static int ensure_path(char **confpath, const char *path)
goto err;
}
*confpath = strdup(fullpath);
if (!*confpath) {
ERROR("failed to dup string '%s'", fullpath);
goto err;
}
*confpath = fullpath;
}
err = EXIT_SUCCESS;
err:
free(fullpath);
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