libqtest: only call fclose() on open files
commitbeb54a87ba74dfac00906b4c876945c6602cd293
authorJesse Larrew <jlarrew@linux.vnet.ibm.com>
Mon, 29 Apr 2013 15:52:52 +0000 (29 10:52 -0500)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 30 Apr 2013 21:04:14 +0000 (30 16:04 -0500)
tree7423a6f46308a3b0a5313bd294a1a5eaff8c1d31
parent08eb8c85e3967b97865d46acadf26dc908fbb094
libqtest: only call fclose() on open files

libqtest.c can segfault when calling fclose() if the pidfile wasn't
opened successfully. This patch fixes the issue.

Signed-off-by: Jesse Larrew <jlarrew@linux.vnet.ibm.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1367250772-17928-1-git-send-email-jlarrew@linux.vnet.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
tests/libqtest.c