diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-06-02 11:49:55 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-06-02 11:49:55 (GMT) |
commit | 7ebe360e85dceb8db580fd76ec8f4d6865e8a5aa (patch) | |
tree | 9057208c869117f1b2d141b725f284ac59c120cb /src/analysis/db/cdb.c | |
parent | 30111e5cf6ff5a7766296ac2579a98c16e7cc7c1 (diff) |
Fixed a memory leak when reading packed buffers.
Diffstat (limited to 'src/analysis/db/cdb.c')
-rw-r--r-- | src/analysis/db/cdb.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/analysis/db/cdb.c b/src/analysis/db/cdb.c index 7044853..bfe6238 100644 --- a/src/analysis/db/cdb.c +++ b/src/analysis/db/cdb.c @@ -876,11 +876,13 @@ static void *g_cdb_archive_process(GCdbArchive *archive) { /* Le canal est fermé, une sortie doit être demandée... */ if (fds[i].revents & POLLNVAL) - goto gcap_bad_exchange; + goto gcap_closed_exchange; /* Données présentes en entrée */ if (fds[i].revents & (POLLIN | POLLPRI)) { + init_packed_buffer(&in_pbuf); + status = recv_packed_buffer(&in_pbuf, fds[i].fd); if (!status) goto gcap_bad_exchange; @@ -958,6 +960,8 @@ static void *g_cdb_archive_process(GCdbArchive *archive) exit_packed_buffer(&in_pbuf); + gcap_closed_exchange: + /* TODO : close conn */ ; |