diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-04-24 22:29:52 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-04-24 22:29:52 (GMT) |
commit | ec14d57b5224166c9665f85f406745ec2f4f5a0f (patch) | |
tree | a12483cd0eb83ee514c70549408240823ee266b2 /src | |
parent | 3a540b5cae1c0f6d92b60c9c42d5807893e34c84 (diff) |
Avoided a double free in case of archive creation failure.
Diffstat (limited to 'src')
-rw-r--r-- | src/analysis/db/server.c | 4 |
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); |