forked from GitHub/gf-core
missing call to free after the call to pgf_abstract_name
This commit is contained in:
@@ -287,7 +287,7 @@ Namespace<V> namespace_insert(Namespace<V> map, ref<V> value)
|
|||||||
return Node<V>::new_node(value,map->left,map->right);
|
return Node<V>::new_node(value,map->left,map->right);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class V>
|
template <class V>
|
||||||
ref<V> namespace_lookup(Namespace<V> map, PgfText *name)
|
ref<V> namespace_lookup(Namespace<V> map, PgfText *name)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -247,6 +247,9 @@ void pgf_free(PgfDB *pgf);
|
|||||||
PGF_API_DECL
|
PGF_API_DECL
|
||||||
void pgf_free_revision(PgfDB *pgf, PgfRevision revision);
|
void pgf_free_revision(PgfDB *pgf, PgfRevision revision);
|
||||||
|
|
||||||
|
/* Returns a newly allocated text which contains the abstract name of
|
||||||
|
* the grammar. The text must be released with a call to free.
|
||||||
|
*/
|
||||||
PGF_API_DECL
|
PGF_API_DECL
|
||||||
PgfText *pgf_abstract_name(PgfDB *db, PgfRevision revision,
|
PgfText *pgf_abstract_name(PgfDB *db, PgfRevision revision,
|
||||||
PgfExn* err);
|
PgfExn* err);
|
||||||
|
|||||||
@@ -1777,6 +1777,7 @@ PGF_getAbstractName(PGFObject *self, void *closure)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyObject *name = PyString_FromStringAndSize(txt->text, txt->size);
|
PyObject *name = PyString_FromStringAndSize(txt->text, txt->size);
|
||||||
|
free(txt);
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user