Bug 764142 (GLUSTER-2410)

Summary: Wrong variable checked after a function call
Product: [Community] GlusterFS Reporter: Sachidananda Urs <sac>
Component: coreAssignee: Sachidananda Urs <sac>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: mainlineCC: gluster-bugs, saurabh, vijay
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Sachidananda Urs 2011-02-11 07:08:38 UTC
In libglusterfs/src/logging.c:

571  cmd_log_filename = gf_strdup (filename);
572  if (!filename) {
573     gf_log ("glusterd",GF_LOG_CRITICAL, "gf_cmd_log_init: strdup"
574             " error\n");

Wrong variable is checked after the function call. Should be (!cmd_log_filename)

Comment 1 Anand Avati 2011-02-17 16:32:21 UTC
PATCH: http://patches.gluster.com/patch/6162 in master (Check correct variable after function call.)

Comment 2 Saurabh 2011-03-09 10:50:29 UTC
checked the code the variable is updated