Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
mcstransd: fix memory leak in new_context_str
The return value of context_new needs to be free with context_free.

Signed-off-by: bauen1 <j2468h@gmail.com>
Acked-by: William Roberts <william.c.roberts@intel.com>
  • Loading branch information
bauen1 authored and bachradsusi committed May 13, 2020
1 parent d7b0207 commit cc00c7e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mcstrans/src/mcstrans.c
Expand Up @@ -919,6 +919,7 @@ new_context_str(const char *incon, const char *range) {
}
context_range_set(con, range);
rcon = strdup(context_str(con));
context_free(con);
if (!rcon) {
goto exit;
}
Expand Down

0 comments on commit cc00c7e

Please sign in to comment.