From 150965ec40a7b35b2459ccd5af0c8eacb59dd0c3 Mon Sep 17 00:00:00 2001
From: Vit Rosin <vit_r@list.ru>
Date: Fri, 19 Feb 2010 15:06:50 +0000
Subject: [PATCH] missing retcheck of g_strdup_printf in logging.c
---
lib/logging.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/lib/logging.c b/lib/logging.c
index c9de5d3..5223a05 100644
a
|
b
|
mc_log(const char *fmt, ...) |
65 | 65 | char *logfilename; |
66 | 66 | |
67 | 67 | if (is_logging_enabled()) { |
68 | | va_start(args, fmt); |
69 | 68 | logfilename = g_strdup_printf("%s/%s/log", home_dir, MC_USERCONF_DIR); |
| 69 | if (logfilename == NULL) |
| 70 | return; |
| 71 | |
| 72 | va_start(args, fmt); |
70 | 73 | if ((f = fopen(logfilename, "a")) != NULL) { |
71 | 74 | (void)vfprintf(f, fmt, args); |
72 | 75 | (void)fclose(f); |