From c937c72b8af5c3ee88c7416b80cfae581331bd52 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Tue, 28 May 2019 16:13:42 +0200 Subject: [PATCH] Fix not found bug --- src/algo_utils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/algo_utils.c b/src/algo_utils.c index af67e58..3813a6d 100644 --- a/src/algo_utils.c +++ b/src/algo_utils.c @@ -139,6 +139,7 @@ void mv_buffer_rtof(struct buffer_resources *app_ctx, struct evt_core_fdinfo* fr bp = g_hash_table_lookup (app_ctx->used_buffer, &from->fd); if (bp == NULL) { fprintf(stderr, "Unable to find a buffer for fd=%d url=%s in rtof\n", from->fd, from->url); + return; } g_hash_table_remove(app_ctx->used_buffer, &(from->fd)); @@ -149,6 +150,7 @@ void mv_buffer_wtof(struct buffer_resources *app_ctx, struct evt_core_fdinfo* fd struct buffer_packet* bp = g_hash_table_lookup (app_ctx->used_buffer, &(fdinfo->fd)); if (bp == NULL) { fprintf(stderr, "Unable to find a buffer for fd=%d url=%s in wtof\n", fdinfo->fd, fdinfo->url); + return; } g_hash_table_remove(app_ctx->used_buffer, &(fdinfo->fd));