From 7e083b57fb08fc7775e5f367e8257ec76f34e9bd Mon Sep 17 00:00:00 2001 From: pancake Date: Fri, 17 Aug 2018 17:38:24 +0200 Subject: [PATCH] Fix last coverities (2 memleaks) --- libr/bin/p/bin_wasm.c | 1 + libr/core/rtr.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libr/bin/p/bin_wasm.c b/libr/bin/p/bin_wasm.c index 53457f7ec7..f0710c5fec 100644 --- a/libr/bin/p/bin_wasm.c +++ b/libr/bin/p/bin_wasm.c @@ -72,6 +72,7 @@ static RList *entries(RBinFile *bf) { } if (!addr) { r_list_free (ret); + r_list_free (codes); return NULL; } } diff --git a/libr/core/rtr.c b/libr/core/rtr.c index b01ed8a79d..f1f9b9a971 100644 --- a/libr/core/rtr.c +++ b/libr/core/rtr.c @@ -1,4 +1,4 @@ -/* radare - Copyright 2009-2017 - pancake, nibble */ +/* radare - Copyright 2009-2018 - pancake, nibble */ #include "r_core.h" #include "r_socket.h" @@ -508,6 +508,7 @@ static int r_core_rtr_http_run(RCore *core, int launch, int browse, const char * newblk = malloc (core->blocksize); if (!newblk) { + r_socket_free (s); return 1; } memcpy (newblk, core->block, core->blocksize);