diff --git a/ffserver.c b/ffserver.c
index 36dc2343e7276a69b6c22ab2bb3c73e72fe51845..fcee8742d1c9f965d5227e209df92afac0f1720e 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -443,6 +443,7 @@ static void start_children(FFServerStream *feed)
         feed->pid = fork();
         if (feed->pid < 0) {
             http_log("Unable to create children: %s\n", strerror(errno));
+            av_free (pathname);
             exit(EXIT_FAILURE);
         }