Free raw on error or empty read - sacc - sacc(omys), simple console gopher client HTML git clone git://bitreich.org/sacc/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/sacc/ DIR Log DIR Files DIR Refs DIR Tags DIR LICENSE --- DIR commit 8c0926c59bc07c2a4f86bfa7ed7ae6179ba8d14c DIR parent 3c632e6df61e2df58aaa753eedaeda289e490c7e HTML Author: Quentin Rameau <quinq@fifth.space> Date: Thu, 22 Jun 2017 14:22:04 +0200 Free raw on error or empty read Diffstat: M sacc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- DIR diff --git a/sacc.c b/sacc.c @@ -306,8 +306,11 @@ dig(Item *entry, Item *item) sendselector(sock, item->selector); item->raw = getrawitem(sock); - if (!*item->raw) /* empty read */ + if (!*item->raw) { /* empty read */ + free(item->raw); + item->raw = NULL; return 0; + } if (item->type == '1') item->dir = molddiritem(item->raw);