From 35019887b56058de909d5cfa9bfe7fed3846d30d Mon Sep 17 00:00:00 2001 From: leonid-ed Date: Fri, 31 Jul 2015 18:57:04 +0300 Subject: [PATCH] tests: fixed a leak in lv2ftpd --- tests/lv2ftpd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/lv2ftpd.c b/tests/lv2ftpd.c index 183ce89..c75aeba 100644 --- a/tests/lv2ftpd.c +++ b/tests/lv2ftpd.c @@ -203,10 +203,13 @@ static int __dir_open(void *m, sexp_t *sx) DIR *dp = NULL; if ( !(dp = opendir(dir_name)) ) { pthread_rwlock_unlock(&_lock); - free(item); + FREE(item); + FREE(dir_name); return sxmsg_return(msg, SNE_FAILED); } + FREE(dir_name); + /* init stream */ item->dsid = _rd_last_id; item->dp = dp;