libglusterfs : fix coverity issue in store.c

This patch fixes CID 1395102 and 1395103.

Change-Id: Ia6093dc6a04dce3f523e015cf1d6d4c6bfccc1f6
updates: bz#789278
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
This commit is contained in:
Sunny Kumar 2018-09-26 21:54:06 +05:30 committed by Amar Tumballi
parent 5b91555a58
commit 7cf6688e9b

View File

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