On Sun, 3 Aug 2014, Diego Biurrun wrote:

On Mon, Jul 28, 2014 at 11:55:38AM +0200, epira...@gmail.com wrote:
From: Marvin Scholz <epira...@gmail.com>

+    // Check for auth data in URI
+    if (auth[0]) {
+        char *sep = strchr(auth,':');
+        if (sep) {
+            *sep = 0;
+            sep++;
+            if (s->pass) {
+                av_free(s->pass);
+                av_log(h, AV_LOG_WARNING, "Overwriting -password <pass> with URI 
password!\n");
+            }
+            if (!(s->pass = av_strdup(sep))) {
+                ret = AVERROR(ENOMEM);
+                goto cleanup;
+            }
+        }
+        if (!(user = av_strdup(auth))) {
+            ret = AVERROR(ENOMEM);
+            goto cleanup;
+        }
+    }
+
+cleanup:
+    // Free variables
+    if (user)
+        av_freep(&user);
+    if (headers)
+        av_freep(&headers);
+    av_dict_free(&opt_dict);
+
+    return ret;
+}

Where does s->pass get freed?

It's an avoption so it gets freed by the avoption system.

// Martin
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to