]> git.sesse.net Git - ffmpeg/commitdiff
use av_strdup instead malloc/strcpy
authorAlex Beregszaszi <alex@rtfs.hu>
Sun, 22 Apr 2007 17:56:26 +0000 (17:56 +0000)
committerAlex Beregszaszi <alex@rtfs.hu>
Sun, 22 Apr 2007 17:56:26 +0000 (17:56 +0000)
Originally committed as revision 8785 to svn://svn.ffmpeg.org/ffmpeg/trunk

ffserver.c

index 682addcb94f6c5c8afc15405bffb49b6fb28ba98..f28cbe2880e2623d7e461527333c84df052f9bde 100644 (file)
@@ -3896,8 +3896,7 @@ static int parse_ffconfig(const char *filename)
                     if (!argbuf[0])
                         break;
 
-                    feed->child_argv[i] = av_malloc(strlen(argbuf) + 1);
-                    strcpy(feed->child_argv[i], argbuf);
+                    feed->child_argv[i] = av_strdup(argbuf);
                 }
 
                 feed->child_argv[i] = av_malloc(30 + strlen(feed->filename));