Project

General

Profile

Bug #3016

sbin/hammer2/cmd_snapshot.c:113]: (error) Memory leak: xname

Added by dcb 3 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
04/11/2017
Due date:
% Done:

0%


Description

$ fgrep xname dragonfly/sbin/hammer2/cmd_snapshot.c
char *xname;
xname = strdup("");
asprintf(&xname, ".%s", strrchr(path, '/') + 1);
asprintf(&xname, ".%s", path);
xname = strdup("");
xname,
$

I don't see anywhere that xname is freed. Maybe this would be a good idea ?

Also available in: Atom PDF