projects
/
services
/
createrepo_c.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
07ba40f
)
xml_parser_repomd: Fix memory leak
author
Tomas Mlcoch
<tmlcoch@redhat.com>
Tue, 23 Jul 2013 06:55:14 +0000
(08:55 +0200)
committer
Tomas Mlcoch
<tmlcoch@redhat.com>
Tue, 23 Jul 2013 06:55:14 +0000
(08:55 +0200)
src/xml_parser_repomd.c
patch
|
blob
|
history
diff --git
a/src/xml_parser_repomd.c
b/src/xml_parser_repomd.c
index
4ac7b2a
..
dcad644
100644
(file)
--- a/
src/xml_parser_repomd.c
+++ b/
src/xml_parser_repomd.c
@@
-138,7
+138,8
@@
cr_start_handler(void *pdata, const char *element, const char **attr)
val = cr_find_attr("type", attr);
if (val)
- pd->repomd->repoid_type = g_strdup(val);
+ pd->repomd->repoid_type = g_string_chunk_insert(pd->repomd->chunk,
+ val);
break;
case STATE_DISTRO:
@@
-271,7
+272,8
@@
cr_end_handler(void *pdata, const char *element)
assert(pd->repomd);
assert(!pd->repomdrecord);
- pd->repomd->repoid = g_strdup(pd->content);
+ pd->repomd->repoid = g_string_chunk_insert(pd->repomd->chunk,
+ pd->content);
break;
case STATE_TAGS: