]> git.sesse.net Git - vlc/commitdiff
Fix potential memleak (CID 196)
authorDerk-Jan Hartman <hartman@videolan.org>
Thu, 9 Oct 2008 00:44:14 +0000 (02:44 +0200)
committerDerk-Jan Hartman <hartman@videolan.org>
Thu, 9 Oct 2008 00:45:32 +0000 (02:45 +0200)
w00t, my first CID fix :D

src/input/input.c

index 5c631479b2b3022eda7efebf839530b887f69b9c..81bda270503dbc88e0fadeafea69ba04f6d674cd 100644 (file)
@@ -257,7 +257,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
             psz_parser = val.psz_string;
             while( (psz_start = strchr( psz_parser, '{' ) ) )
             {
-                 seekpoint_t *p_seekpoint = vlc_seekpoint_New();
+                 seekpoint_t *p_seekpoint;
                  char backup;
                  psz_start++;
                  psz_end = strchr( psz_start, '}' );
@@ -266,6 +266,8 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
                  backup = *psz_parser;
                  *psz_parser = 0;
                  *psz_end = ',';
+
+                 p_seekpoint = vlc_seekpoint_New();
                  while( (psz_end = strchr( psz_start, ',' ) ) )
                  {
                      *psz_end = 0;