Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

Commit

Permalink
persistence: Ensure no leaks on failure
Browse files Browse the repository at this point in the history
If `persist_reset` fails, we need to free `mdata->name`.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
  • Loading branch information
edersondisouza committed Sep 25, 2015
1 parent 9ecfc9c commit 6908b50
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/modules/flow/persistence/persistence.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ persist_open(struct sol_flow_node *node,
}
if (r == -ENOENT) {
/* No file. Send default value */
return persist_reset(mdata, node);
r = persist_reset(mdata, node);
SOL_INT_CHECK_GOTO(r, < 0, err);
return r;
}
SOL_INT_CHECK_GOTO(r, < 0, err);

Expand Down

0 comments on commit 6908b50

Please sign in to comment.