Message ID | 20190508133536.6077-15-steved@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Covertity Scan: Removed resources leaks | expand |
diff --git a/utils/mount/configfile.c b/utils/mount/configfile.c index b48b25e..93fe500 100644 --- a/utils/mount/configfile.c +++ b/utils/mount/configfile.c @@ -404,7 +404,7 @@ char *conf_get_mntopts(char *spec, char *mount_point, /* list_size + optlen + ',' + '\0' */ config_opts = calloc(1, (list_size+optlen+2)); - if (server == NULL) { + if (config_opts == NULL) { xlog_warn("conf_get_mountops: Unable calloc memory for config_opts"); free_all(); return mount_opts;
mount/configfile.c:410: leaked_storage: Variable "config_opts" going out of scope leaks the storage it points to. Signed-off-by: Steve Dickson <steved@redhat.com> --- utils/mount/configfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)