Skip to content

Commit 85430af

Browse files
peffgitster
authored andcommitted
http-push: clear refspecs before exiting
We parse the command-line arguments into a refspec struct, but we never free them. We should do so before exiting to avoid triggering the leak-checker. This triggers in t5540 many times (basically every invocation of http-push). Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 134bfed commit 85430af

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

http-push.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1983,5 +1983,7 @@ int cmd_main(int argc, const char **argv)
19831983
request = next_request;
19841984
}
19851985

1986+
refspec_clear(&rs);
1987+
19861988
return rc;
19871989
}

0 commit comments

Comments
 (0)