From 40ae90ef29c62be007c9fc936fc470cc5db4f20d Mon Sep 17 00:00:00 2001 From: Cyril Hrubis Date: Wed, 14 Aug 2013 22:23:40 +0200 Subject: [PATCH] loaders: TmpFile: Fix potentionaly unitialized err Signed-off-by: Cyril Hrubis --- libs/loaders/GP_TmpFile.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/loaders/GP_TmpFile.c b/libs/loaders/GP_TmpFile.c index 3704946d..0dbb5ad7 100644 --- a/libs/loaders/GP_TmpFile.c +++ b/libs/loaders/GP_TmpFile.c @@ -166,8 +166,10 @@ int GP_SaveTmpFile(const GP_Context *src, const char *dst_path, GP_ProgressCallbackReport(callback, y, src->h, src->w); } - if (fclose(f)) + if (fclose(f)) { + err = errno; goto err0; + } GP_ProgressCallbackDone(callback); -- 2.11.4.GIT