mpm/hs: fix minor coverity warning

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).
pull/3331/head
Victor Julien 8 years ago
parent 7ea80b5c57
commit 3854c304d8

@ -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;

Loading…
Cancel
Save