libmultipath: free allocated value in set_int
authorBenjamin Marzinski <bmarzins@redhat.com>
Thu, 11 Oct 2018 20:43:47 +0000 (15:43 -0500)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Fri, 12 Oct 2018 07:36:29 +0000 (09:36 +0200)
set_int() needs to free the buffer it got back from set_value()

Fixes: 8f9ac30d ("libmultipath: fix set_int error path")
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
libmultipath/dict.c

index bf4701e..c3f5a6e 100644 (file)
@@ -39,6 +39,7 @@ set_int(vector strvec, void *ptr)
 
        *int_ptr = atoi(buff);
 
+       FREE(buff);
        return 0;
 }