coverity: closedir on error path

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
Serge Hallyn 2013-10-07 14:03:20 -05:00
parent dab75acca0
commit 9baa57bdd4

View File

@ -2538,6 +2538,10 @@ out_free:
lxcsnap_free(&snaps[i]); lxcsnap_free(&snaps[i]);
free(snaps); free(snaps);
} }
process_lock();
if (closedir(dir))
WARN("failed to close directory");
process_unlock();
return -1; return -1;
} }