changeset 7271:8c58eeb20826 libavcodec

Fix the logic to access the location of a string to free when setting a new value for a string with av_set_string2(). Fix a segmentation fault.
author stefano
date Sun, 13 Jul 2008 21:28:17 +0000
parents 26818b216bfb
children 643c85503f1f
files opt.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/opt.c	Sun Jul 13 20:41:09 2008 +0000
+++ b/opt.c	Sun Jul 13 21:28:17 2008 +0000
@@ -196,7 +196,7 @@
     }
 
     if(alloc){
-        av_free((void*)(((uint8_t*)obj) + o->offset));
+        av_free(*(void**)(((uint8_t*)obj) + o->offset));
         val= av_strdup(val);
     }