diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2013-02-18 16:24:11 +0100 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2013-02-19 14:14:00 +0100 |
commit | a38722be2ba63466431616a0756981697d29fa23 (patch) | |
tree | c1ccddf087f0e48c168f5d71f139ed80421659ac /include/fuse_opt.h | |
parent | 4337a329552fdf70ae717e901d25842c22ff9b19 (diff) | |
download | libfuse-a38722be2ba63466431616a0756981697d29fa23.tar.gz |
fuse_opt_parse(): fix memory leak
when storing a newly allocated string for format "%s", free the previous value
stored at that location.
Reported by Marco Schuster
Diffstat (limited to 'include/fuse_opt.h')
-rw-r--r-- | include/fuse_opt.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/fuse_opt.h b/include/fuse_opt.h index add0a30..20653b1 100644 --- a/include/fuse_opt.h +++ b/include/fuse_opt.h @@ -70,8 +70,9 @@ extern "C" { * * 6) "-x %s", etc. Combination of 4) and 5) * - * If the format is "%s", memory is allocated for the string unlike - * with scanf(). + * If the format is "%s", memory is allocated for the string unlike with + * scanf(). The previous value (if non-NULL) stored at the this location is + * freed. */ struct fuse_opt { /** Matching template and optional parameter formatting */ |