From 6c2deb080aa2df73d3cb2a5f330208d30e9c6759 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Fri, 13 Jul 2018 14:45:31 +0530 Subject: logging: check for fmts not being NULL this fix is just a review of possible SIGSEGV issues in line 714 as per crash report at the bug: ``` 08:35:25 Program terminated with signal 11, Segmentation fault. 08:35:25 #0 0x00007f4ebb491c5c in gf_time_fmt (dst=0x7f4eb1ff9a90 "", sz_dst=256, utime=1531470915, fmt=0) at /home/jenkins/root/workspace/centos7-regression/libglusterfs/src/common-utils.h:714 ``` fixes: bz#1600878 Change-Id: I160c391f8ac1a3456e59103d293b24e0e3fae718 Signed-off-by: Amar Tumballi --- libglusterfs/src/common-utils.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libglusterfs/src/common-utils.c') diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c index 09f0caa7e8a..d7888f526df 100644 --- a/libglusterfs/src/common-utils.c +++ b/libglusterfs/src/common-utils.c @@ -3097,9 +3097,8 @@ static const char *__gf_zerotimes[] = { }; void -_gf_timestuff (gf_timefmts *fmt, const char ***fmts, const char ***zeros) +_gf_timestuff (const char ***fmts, const char ***zeros) { - *fmt = gf_timefmt_last; *fmts = __gf_timefmts; *zeros = __gf_zerotimes; } -- cgit