Project

General

Profile

Actions

Bug #1332

closed
VJ EL

cppcheck: ioctl

Bug #1332: cppcheck: ioctl

Added by Victor Julien over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

[src/util-ioctl.c:226]: (error) Resource leak: fd
[src/util-ioctl.c:238]: (error) Mismatching allocation and deallocation: fd
[src/util-ioctl.c:241]: (error) Mismatching allocation and deallocation: fd

EL Updated by Eric Leblond over 11 years ago Actions #1

It may be a false positive here. All returns are preceded by a close call with fd param but the first which is the case where we handle the failure. By the way, I've got no error with cppcheck 1.67 by running:

cppcheck --enable=all --force --inconclusive --std=posix  src/util-ioctl.c --quiet

VJ Updated by Victor Julien over 11 years ago Actions #2

I wonder if the "Mismatching allocation and deallocation: fd" are about using 'close' instead of 'shutdown'?

VJ Updated by Victor Julien over 11 years ago Actions #3

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

My cppcheck version was 1.64. I can confirm the issue is gone in 1.67.

Actions

Also available in: PDF Atom