Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
7fcb4d9c
Commit
7fcb4d9c
authored
Sep 06, 2006
by
Christian Würdig
Browse files
fixed plist_new when no obstack is given
[r8182]
parent
fb4d0c4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/adt/plist.c
View file @
7fcb4d9c
...
...
@@ -39,7 +39,9 @@ static plist_element_t *allocate_element(plist_t* list) {
plist_t
*
plist_new
(
void
)
{
plist_t
*
list
=
xmalloc
(
sizeof
(
*
list
));
list
->
obst
=
xmalloc
(
sizeof
(
*
list
->
obst
));
obstack_init
(
list
->
obst
);
list
->
foreign_obstack
=
0
;
list
->
first_element
=
NULL
;
list
->
last_element
=
NULL
;
...
...
@@ -70,6 +72,7 @@ void plist_free(plist_t *list) {
if
(
!
list
->
foreign_obstack
)
{
obstack_free
(
list
->
obst
,
NULL
);
xfree
(
list
->
obst
);
xfree
(
list
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment