Skip to content

Commit 60677b8

Browse files
committed
Move deallocation to avoid use-after-free with LOB fetchAsString/fetchAsBuffer
1 parent 3c36bad commit 60677b8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/njs/src/njsConnection.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -447,10 +447,7 @@ typedef struct eBaton
447447
}
448448
persistentRefs.clear ();
449449
}
450-
if( mInfo && !getRS )
451-
{
452-
delete [] mInfo;
453-
}
450+
454451
if ( lobInfo )
455452
{
456453
if ( lobInfo->lobLocator )
@@ -535,6 +532,10 @@ typedef struct eBaton
535532
}
536533
}
537534
}
535+
if( mInfo && !getRS )
536+
{
537+
delete [] mInfo;
538+
}
538539
}
539540
}eBaton;
540541

0 commit comments

Comments
 (0)