Skip to content

Commit

Permalink
Fix memory leak in vikobjectbuilder.c
Browse files Browse the repository at this point in the history
  • Loading branch information
rnorris committed Jan 18, 2025
1 parent 6481f08 commit 27923a7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/vikgobjectbuilder.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,9 @@ _text (GMarkupParseContext *context,
/* parameter value */
/* We have to retrieve the expected type of the value
* in order to do the correct transformation */
GObjectClass *oclass;
oclass = g_type_class_ref (gtype);
g_assert (oclass != NULL);
GParamSpec *pspec;
pspec = g_object_class_find_property (G_OBJECT_CLASS (oclass), property_name);
GObjectClass *oclass = g_type_class_ref (gtype);
GParamSpec *pspec = g_object_class_find_property (G_OBJECT_CLASS (oclass), property_name);
g_type_class_unref ( oclass );
if (!pspec)
{
g_warning ("Unknown property: %s.%s", g_type_name (gtype), property_name);
Expand Down

0 comments on commit 27923a7

Please sign in to comment.