tests: fixed a leak in lv2ftpd

v0.5.xx
leonid-ed 9 years ago
parent 5606c799ae
commit 35019887b5

@ -203,10 +203,13 @@ static int __dir_open(void *m, sexp_t *sx)
DIR *dp = NULL; DIR *dp = NULL;
if ( !(dp = opendir(dir_name)) ) { if ( !(dp = opendir(dir_name)) ) {
pthread_rwlock_unlock(&_lock); pthread_rwlock_unlock(&_lock);
free(item); FREE(item);
FREE(dir_name);
return sxmsg_return(msg, SNE_FAILED); return sxmsg_return(msg, SNE_FAILED);
} }
FREE(dir_name);
/* init stream */ /* init stream */
item->dsid = _rd_last_id; item->dsid = _rd_last_id;
item->dp = dp; item->dp = dp;

Loading…
Cancel
Save