Commit 10b76089 authored by Max Kellermann's avatar Max Kellermann

directory_save: free directory on error

Fix a minor memory leak in the error handler.
parent 2cd8a9fe
......@@ -128,8 +128,10 @@ directory_load_subdir(FILE *fp, struct directory *parent, const char *name,
directory = directory_new(name, parent);
success = directory_load(fp, directory, error_r);
if (!success)
if (!success) {
directory_free(directory);
return NULL;
}
return directory;
}
......
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