Bug 764142 (GLUSTER-2410) - Wrong variable checked after a function call
Summary: Wrong variable checked after a function call
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-2410
Product: GlusterFS
Classification: Community
Component: core
Version: mainline
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Sachidananda Urs
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-11 07:08 UTC by Sachidananda Urs
Modified: 2015-12-01 16:45 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.