Browse Source

* simdb_search : fix realloc

master
Alex 'AdUser' Z 7 years ago
parent
commit
38b6f760ac
  1. 2
      src/database.c

2
src/database.c

@ -449,7 +449,7 @@ simdb_search(simdb_t *db, simdb_search_t *search, simdb_urec_t *sample, int skip
if (found == capacity) {
simdb_match_t *tmp = NULL;
capacity *= 2;
if ((tmp = realloc(matches, capacity)) == NULL) {
if ((tmp = realloc(matches, capacity * sizeof(simdb_match_t))) == NULL) {
/* fuck! */
FREE(matches);
FREE(data);

Loading…
Cancel
Save