]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] Fix double free in the client... 5562/head
authorVsevolod Stakhov <vsevolod@rspamd.com>
Wed, 6 Aug 2025 16:06:48 +0000 (17:06 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Wed, 6 Aug 2025 16:06:48 +0000 (17:06 +0100)
src/client/rspamdclient.c

index 4d79590c52c7e9a476bf6178ebd77e54106d9ec2..24240d3c25b8b20a1217c2b52b5cc0462856c93a 100644 (file)
@@ -192,7 +192,8 @@ rspamd_client_finish_handler(struct rspamd_http_connection *conn,
                                        if (zout.pos == zout.size) {
                                                /* We need to extend output buffer */
                                                zout.size = zout.size * 2;
-                                               zout.dst = g_realloc(zout.dst, zout.size);
+                                               out = g_realloc(zout.dst, zout.size);
+                                               zout.dst = out;
                                        }
                                }