av_opt_set_from_string: fix memleak
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 11 Oct 2012 02:42:52 +0000 (04:42 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 11 Oct 2012 02:42:52 +0000 (04:42 +0200)
Fixes CID733801
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavutil/opt.c

index f2ce978..ed475ec 100644 (file)
@@ -869,6 +869,7 @@ int av_opt_set_from_string(void *ctx, const char *opts,
         if ((ret = av_opt_set(ctx, key, value, 0)) < 0) {
             if (ret == AVERROR_OPTION_NOT_FOUND)
                 av_log(ctx, AV_LOG_ERROR, "Option '%s' not found\n", key);
+            av_free(value);
             return ret;
         }