"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Omar Polo <op@omarpolo.com>
Subject:
plug leak in resolve_symlink
To:
gameoftrees@openbsd.org
Date:
Sat, 03 Sep 2022 16:48:47 +0200

Download raw body.

Thread
The path allocated by got_path_dirname is not released.  probably a
leftover from a previous dirname(3) call?

diff /tmp/got
commit - c284d624c415ca86a512de461f47d1bf12aa705b
path + /tmp/got
blob - 9fcd4fa3978b2e29657e3fb07c4d6af41f6427cd
file + lib/object.c
--- lib/object.c
+++ lib/object.c
@@ -2192,6 +2192,7 @@ resolve_symlink(char **link_target, const char *path,
 		}
 	}
 done:
+	free(parent_path);
 	free(tree_obj_id);
 	if (tree)
 		got_object_tree_close(tree);