Skip to content

Commit

Permalink
fix realloc corruption
Browse files Browse the repository at this point in the history
can't figure out why this is happening, but let's disable it for now
while we test. we shouldn't hit this code path anyways once we switch
over to local notes in damus ios

Signed-off-by: William Casarin <[email protected]>
  • Loading branch information
jb55 committed Apr 25, 2024
1 parent 6c950d5 commit 46984be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/nostrdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -5841,9 +5841,9 @@ static struct ndb_blocks *ndb_note_to_blocks(struct ndb_note *note)
return NULL;
}

blocks = realloc(blocks, ndb_blocks_total_size(blocks));
if (blocks == NULL)
return NULL;
//blocks = realloc(blocks, ndb_blocks_total_size(blocks));
//if (blocks == NULL)
//return NULL;

blocks->flags |= NDB_BLOCK_FLAG_OWNED;

Expand Down

0 comments on commit 46984be

Please sign in to comment.