mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cleanup: avoid memory leak
Coverity CID 208333 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
da1d6e97f6
commit
42db44510d
1 changed files with 3 additions and 1 deletions
|
@ -1099,7 +1099,9 @@ static void create_commit_message(struct membuffer *msg, bool create_empty)
|
|||
} while ((dc = dc->next) != NULL);
|
||||
put_format(msg, "\n");
|
||||
}
|
||||
put_format(msg, "Created by %s\n", subsurface_user_agent());
|
||||
const char *user_agent = subsurface_user_agent();
|
||||
put_format(msg, "Created by %s\n", user_agent);
|
||||
free((void *)user_agent);
|
||||
}
|
||||
|
||||
static int create_new_commit(git_repository *repo, const char *remote, const char *branch, git_oid *tree_id, bool create_empty)
|
||||
|
|
Loading…
Add table
Reference in a new issue