Project

General

Profile

Actions

Bug #1788

closed

af-packet coverity warning

Added by Victor Julien over 8 years ago. Updated over 6 years ago.

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

Description

** CID 1362014:    (RESOURCE_LEAK)
/src/source-af-packet.c: 1799 in AFPSetupRing()
/src/source-af-packet.c: 1803 in AFPSetupRing()

________________________________________________________________________________________________________
*** CID 1362014:    (RESOURCE_LEAK)
/src/source-af-packet.c: 1799 in AFPSetupRing()
1793             }
1794             ptv->frame_offset = 0;
1795     #ifdef HAVE_TPACKET_V3
1796         }
1797     #endif
1798     
>>>     CID 1362014:    (RESOURCE_LEAK)
>>>     Variable "ring_buf" going out of scope leaks the storage it points to.
1799         return 0;
1800     
1801     mmap_err:
1802         /* Packet mmap does the cleaning when socket is closed */
1803         return AFP_FATAL_ERROR;
1804     }
/src/source-af-packet.c: 1803 in AFPSetupRing()
1797     #endif
1798     
1799         return 0;
1800     
1801     mmap_err:
1802         /* Packet mmap does the cleaning when socket is closed */
>>>     CID 1362014:    (RESOURCE_LEAK)
>>>     Variable "ring_buf" going out of scope leaks the storage it points to.
1803         return AFP_FATAL_ERROR;
1804     }
1805     
1806     static int AFPCreateSocket(AFPThreadVars *ptv, char *devname, int verbose)
1807     {
1808         int r;
Actions

Also available in: Atom PDF