Skip to content

Commit

Permalink
modules/kvs/kvstxn: Fix mem-leak in kvs merge
Browse files Browse the repository at this point in the history
In kvstxn_create_empty(), the 'keys' array was created that
could be overwritten without being destroyed.  This was a corner
case in PR flux-framework#1859, when key generation was altered.

Fixes flux-framework#1944
  • Loading branch information
chu11 committed Jan 22, 2019
1 parent 546f945 commit 6c6068f
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/modules/kvs/kvstxn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1289,8 +1289,6 @@ static kvstxn_t *kvstxn_create_empty (kvstxn_mgr_t *ktm, int flags)
goto error_enomem;
if (!(ktnew->ops = json_array ()))
goto error_enomem;
if (!(ktnew->keys = json_array ()))
goto error_enomem;
if (!(ktnew->names = json_array ()))
goto error_enomem;
if (!(ktnew->missing_refs_list = zlist_new ()))
Expand Down

0 comments on commit 6c6068f

Please sign in to comment.