From: Nelson Ferreira Date: Wed, 29 Feb 2012 21:11:08 +0000 (-0500) Subject: Coverity: Resource leak: CID 400020 X-Git-Tag: v22.1.15~24^2~1 X-Git-Url: http://cgit.sxemacs.org/?a=commitdiff_plain;h=ec1c1203c9fea418ec1b6205bd176774175a8e43;p=sxemacs Coverity: Resource leak: CID 400020 * src/editfns.c (Ftemp_directory): Check against 0 too. Unlikely but possible. Signed-off-by: Nelson Ferreira --- diff --git a/src/editfns.c b/src/editfns.c index 089b7f4..0faac7b 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -630,7 +630,7 @@ On Unix it is obtained from TMPDIR, with /tmp as the default. /* we already are reserved these 20 bytes... */ strcat(warnpath, ".created_by_sxemacs"); if ((fd = open(warnpath, O_WRONLY | O_CREAT, - 0644)) > 0) { + 0644)) >= 0) { write(fd, "SXEmacs created this directory " "because /tmp/ " "was unavailable -- \nPlease check !\n", 89);