[CLASSES]: Use strdup for decl_file too
Not safe to directly point to the string parameter, probably its a inline string, not an indirect one, one more reason to create a string table... Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
This commit is contained in:
parent
41ca570938
commit
31a5245c8c
|
@ -283,7 +283,9 @@ static struct class *class__new(const unsigned int tag,
|
|||
self->name = NULL;
|
||||
if (name != NULL)
|
||||
self->name = strdup(name);
|
||||
self->decl_file = decl_file;
|
||||
self->decl_file = NULL;
|
||||
if (decl_file != NULL)
|
||||
self->decl_file = strdup(decl_file);
|
||||
self->decl_line = decl_line;
|
||||
self->nr_holes = 0;
|
||||
self->nr_labels = 0;
|
||||
|
|
Loading…
Reference in New Issue