libglusterfs : fix coverity in store.c

This patch fixes CID 1395103 and 1395102.

Change-Id: I8c9fad85f254a55697b0bad185dcdd02be64f682
updates: bz#789278
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
This commit is contained in:
Sunny Kumar 2018-08-27 17:31:28 +05:30 committed by Amar Tumballi
parent dcacaf15ec
commit df4beaf9a4

View File

@ -420,7 +420,7 @@ out:
if (fd >= 0)
sys_close (fd);
if (ret == -1) {
if (ret < 0) {
GF_FREE (spath);
GF_FREE (shandle);
}