Skip to content

Commit

Permalink
mpm/hs: fix minor coverity warning
Browse files Browse the repository at this point in the history
CID 1428797 (#1 of 1): Unchecked return value (CHECKED_RETURN)
    check_return: Calling HashTableAdd without checking return value
    (as is done elsewhere 5 out of 6 times).
  • Loading branch information
victorjulien committed Apr 3, 2018
1 parent 7ea80b5 commit 3854c30
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/util-mpm-hs.c
Original file line number Diff line number Diff line change
Expand Up @@ -716,8 +716,10 @@ int SCHSPreparePatterns(MpmCtx *mpm_ctx)

/* Cache this database globally for later. */
pd->ref_cnt = 1;
HashTableAdd(g_db_table, pd, 1);
int r = HashTableAdd(g_db_table, pd, 1);
SCMutexUnlock(&g_db_table_mutex);
if (r < 0)
goto error;

SCHSFreeCompileData(cd);
return 0;
Expand Down

0 comments on commit 3854c30

Please sign in to comment.