diff mbox series

[15/19] Removed a resource leak from mount/nfsmount.c

Message ID 20190508133536.6077-16-steved@redhat.com (mailing list archive)
State New, archived
Headers show
Series Covertity Scan: Removed resources leaks | expand

Commit Message

Steve Dickson May 8, 2019, 1:35 p.m. UTC
mount/nfsmount.c:455: leaked_storage: Variable "mounthost" going
	out of scope leaks the storage it points to.

Signed-off-by: Steve Dickson <steved@redhat.com>
---
 utils/mount/nfsmount.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/utils/mount/nfsmount.c b/utils/mount/nfsmount.c
index 952a755..3d95da9 100644
--- a/utils/mount/nfsmount.c
+++ b/utils/mount/nfsmount.c
@@ -452,6 +452,7 @@  parse_options(char *old_opts, struct nfs_mount_data *data,
 	nfs_error(_("%s: Bad nfs mount parameter: %s\n"), progname, opt);
  out_bad:
 	free(tmp_opts);
+	free(mounthost);
 	return 0;
 }