diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2015-05-28 20:17:39 (GMT) |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2015-05-28 20:17:45 (GMT) |
commit | 8bfe8b28447fbbf8ff1cc4b1fec11bb92af6ef14 (patch) | |
tree | d8fa02717dfc3cd90e1db24812e40f824c400fdb /src/main.c | |
parent | adcdf71a92f1ddf447795794c51fe3eba0e47c94 (diff) | |
download | soup-transcoding-proxy-8bfe8b28447fbbf8ff1cc4b1fec11bb92af6ef14.zip soup-transcoding-proxy-8bfe8b28447fbbf8ff1cc4b1fec11bb92af6ef14.tar.gz |
main.c: Fix double-free
The cleanup will be called when the pipeline goes EOS, so don't do it twice
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -171,8 +171,6 @@ stp_abort_server_ctx (STPServerCtx *ctx) soup_message_set_status (ctx->msg, SOUP_STATUS_GONE); } stream_finished_cb (ctx->msg, ctx); - /* Disconnect all clients, and shut down the stream */ - invoke_g_hash_table_remove (ctx); } /* If it's been more than 5 seconds since the last time we got @@ -310,7 +308,7 @@ stream_finished_cb (SoupMessage *msg, } ctx->status = STP_STATUS_FLUSHING; - /* Incoming stream has ended */ + /* Incoming stream has ended; this EOS will trigger a cleanup of ctx as well */ g_signal_emit_by_name (ctx->appsrc, "end-of-stream", &ret); if (ret != GST_FLOW_OK) g_critical ("\nUnable to emit end-of-stream after an aborted stream"); @@ -713,9 +711,9 @@ PUT: { * of the previous one, so it's a conflict... unless the * '--conflict-is-restart' option has been specified. */ if (conflict_is_restart) { + g_debug ("A connection already exists; forcing a restart"); ctx = get_server_ctx_from_msg (msg, tables->ctxs); stream_finished_cb (ctx->msg, ctx); - invoke_g_hash_table_remove (ctx); goto new_conn; } g_critical ("Recv Content-Length PUT on '%s' without Content-Range", path); |