Skip to content

Commit

Permalink
fix: double free and deref after free in js.c (#839)
Browse files Browse the repository at this point in the history
* fix: double free and deref after free in js.c

* fix: double free and deref after free in js.c - refactoring

* fix: double free and deref after free in js.c - refactoring

* fix: double free and deref after free in js.c - refactoring
  • Loading branch information
wooffie authored Feb 18, 2025
1 parent 8943308 commit 046912f
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/js.c
Original file line number Diff line number Diff line change
Expand Up @@ -3535,10 +3535,7 @@ jsSub_resetOrderedConsumer(natsSubscription *sub, uint64_t sseq)

s = natsThread_Create(&oci->thread, _recreateOrderedCons, (void*) oci);
if (s != NATS_OK)
{
NATS_FREE(oci);
natsSub_release(sub);
}
}
if ((s != NATS_OK) && (oci != NULL))
{
Expand Down

0 comments on commit 046912f

Please sign in to comment.