Skip to content

Commit

Permalink
libkvs/dir: kvsdir_create handle invalid arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
garlick authored and chu11 committed Aug 18, 2017
1 parent c361b52 commit 5e2ea3c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/common/libkvs/kvs_dir.c
Expand Up @@ -71,6 +71,10 @@ kvsdir_t *kvsdir_create (flux_t *handle, const char *rootref,
{
kvsdir_t *dir;

if (!key || !json_str) {
errno = EINVAL;
return NULL;
}
if (!(dir = calloc (1, sizeof (*dir))))
goto nomem;

Expand Down

0 comments on commit 5e2ea3c

Please sign in to comment.