summaryrefslogtreecommitdiff
path: root/src/analysis
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-04-24 22:29:52 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-04-24 22:29:52 (GMT)
commitec14d57b5224166c9665f85f406745ec2f4f5a0f (patch)
treea12483cd0eb83ee514c70549408240823ee266b2 /src/analysis
parent3a540b5cae1c0f6d92b60c9c42d5807893e34c84 (diff)
Avoided a double free in case of archive creation failure.
Diffstat (limited to 'src/analysis')
-rw-r--r--src/analysis/db/server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/analysis/db/server.c b/src/analysis/db/server.c
index 1565501..0debd83 100644
--- a/src/analysis/db/server.c
+++ b/src/analysis/db/server.c
@@ -739,8 +739,6 @@ static void *g_db_server_listener(GDbServer *server)
status = send_packed_buffer(&out_pbuf, fd);
if (!status) goto gdsl_out_error;
- exit_packed_buffer(&out_pbuf);
-
/**
* L'ajout dans la liste des clients connectés provoque un envoie de mises à jour.
* L'éventuelle erreur survenant pendant l'envoi ne peut donc pas être remontée
@@ -754,6 +752,8 @@ static void *g_db_server_listener(GDbServer *server)
server->archives = g_list_append(server->archives, archive);
error = g_cdb_archive_add_client(archive, fd, &user);
+ exit_packed_buffer(&out_pbuf);
+
free(peer_name);
exit_rle_string(&hash);