]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
rtmp: fix double-free on URL parse errors
authorDaniel Stenberg <daniel@haxx.se>
Mon, 10 Nov 2025 07:11:30 +0000 (08:11 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 10 Nov 2025 07:53:30 +0000 (08:53 +0100)
Reported-by: Stanislav Fort (Aisle Research)
Closes #19438

lib/curl_rtmp.c

index 779422c9ae7f059189970325881a6b48d8a79c3a..4a5e5cb637acf3f65a40d50c9ced7c3e71bb00fd 100644 (file)
@@ -240,10 +240,9 @@ static CURLcode rtmp_setup_connection(struct Curl_easy *data,
 
   RTMP_Init(r);
   RTMP_SetBufferMS(r, DEF_BUFTIME);
-  if(!RTMP_SetupURL(r, data->state.url)) {
-    RTMP_Free(r);
+  if(!RTMP_SetupURL(r, data->state.url))
+    /* rtmp_conn_dtor() performs the cleanup */
     return CURLE_URL_MALFORMAT;
-  }
   return CURLE_OK;
 }