Skip to content
Permalink
Browse files
Fix small memory leak in VLE
Fixed a small memory leak in the VLE. A character string for the edge
lable name in the local VLE context was not getting freed.
  • Loading branch information
jrgemignani committed Mar 22, 2022
1 parent 3a6e247 commit 2462000700eeb0249b2d2a4e9c8465aea9883fbb
Showing 1 changed file with 12 additions and 2 deletions.
@@ -358,8 +358,18 @@ static void free_VLE_local_context(VLE_local_context *vlelctx)
}

/* free the stored graph name */
pfree(vlelctx->graph_name);
vlelctx->graph_name = NULL;
if (vlelctx->graph_name != NULL)
{
pfree(vlelctx->graph_name);
vlelctx->graph_name = NULL;
}

/* free the stored edge label name */
if (vlelctx->edge_label_name != NULL)
{
pfree(vlelctx->edge_label_name);
vlelctx->edge_label_name = NULL;
}

/* we need to free our state hashtable */
hash_destroy(vlelctx->edge_state_hashtable);

0 comments on commit 2462000

Please sign in to comment.