Missing unwrap on error path.. Signed-off-by: maximilian attems <max at stro.at> --- usr/kinit/nfsmount/main.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/usr/kinit/nfsmount/main.c b/usr/kinit/nfsmount/main.c index beda723..b85901a 100644 --- a/usr/kinit/nfsmount/main.c +++ b/usr/kinit/nfsmount/main.c @@ -214,6 +214,7 @@ int nfsmount_main(int argc, char *argv[]) if ((rem_path = strchr(rem_path, ':')) == NULL) { fprintf(stderr, "%s: need a server\n", progname); + free(rem_name); return 1; } @@ -221,6 +222,7 @@ int nfsmount_main(int argc, char *argv[]) if (*rem_path != '/') { fprintf(stderr, "%s: need a path\n", progname); + free(rem_name); return 1; } @@ -239,8 +241,10 @@ int nfsmount_main(int argc, char *argv[]) if (portmap_file) spoof_portmap = start_dummy_portmap(portmap_file); - if (spoof_portmap == -1) + if (spoof_portmap == -1) { + free(rem_name); return 1; + } #endif ret = 0; -- 1.7.5.3