From 6e7b3b94d77da6b56f689b640c75de8c2aa9617d Mon Sep 17 00:00:00 2001 From: William Casarin Date: Thu, 12 Jun 2025 09:31:11 -0700 Subject: [PATCH] nostrdb: cleanup previous patch I wanted to not amend this since we've already applied it in the nostrdb-update branch on damus and I don't want to conflict Signed-off-by: William Casarin --- nostrdb/src/nostrdb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nostrdb/src/nostrdb.c b/nostrdb/src/nostrdb.c index a2464ac6..990bdf1d 100644 --- a/nostrdb/src/nostrdb.c +++ b/nostrdb/src/nostrdb.c @@ -7081,6 +7081,7 @@ static struct ndb_blocks *ndb_note_to_blocks(struct ndb_note *note) const char *content; size_t content_len; struct ndb_blocks *blocks; + unsigned char *buffer; content = ndb_note_content(note); content_len = ndb_note_content_length(note); @@ -7089,7 +7090,7 @@ static struct ndb_blocks *ndb_note_to_blocks(struct ndb_note *note) if (content_len >= INT32_MAX) return NULL; - unsigned char *buffer = malloc(2<<18); // Not carefully calculated, but ok because we will not need this once we switch to the local relay model + buffer = malloc(2<<18); // Not carefully calculated, but ok because we will not need this once we switch to the local relay model if (!buffer) return NULL;