Skip to content

Commit

Permalink
warning: Use of memory after it is freed
Browse files Browse the repository at this point in the history
$ scan-build ./configure
...
$ scan-build --keep-cc make
...
fr-command-dpkg.c:76:23: warning: Use of memory after it is freed
        fdata->name = g_strdup (name);
                      ^~~~~~~~~~~~~~~
...
  • Loading branch information
rbuj authored and raveit65 committed Feb 20, 2019
1 parent c9eb7cb commit 333a9e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fr-command-dpkg.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ process_metadata_line (char *line,
fdata->original_path = fdata->full_path + 1;

g_strfreev (fields);
g_free (name);

fdata->name = g_strdup (name);
g_free (name);
fdata->path = g_strdup ("DEBIAN");
fr_command_add_file (comm, fdata);
}
Expand Down

0 comments on commit 333a9e9

Please sign in to comment.