#48284 free target entry when add operation fails
Closed: Fixed None Opened 3 years ago by mreynolds.

There are cases where the target entry for ADD is not freed when certain internal errors occur. The entry is supposed to be consumed, so it should always be freed before returning to the caller.


Looks good to me. One small request. Might be a bit too paranoiac, but could you add something like "slapi_pblock_set(pb, SLAPI_ADD_ENTRY, NULL)" at the line 323 to make sure the entry never be available? Thanks!!
{{{
319 / free the entry as it's expected to be consumed /
320 Slapi_Entry *e;
321 slapi_pblock_get (pb, SLAPI_ADD_ENTRY, &e);
322 slapi_entry_free(e);
}}}

Replying to [comment:2 nhosoi]:

Looks good to me. One small request. Might be a bit too paranoiac, but could you add something like "slapi_pblock_set(pb, SLAPI_ADD_ENTRY, NULL)" at the line 323 to make sure the entry never be available? Thanks!!
{{{
319 / free the entry as it's expected to be consumed /
320 Slapi_Entry *e;
321 slapi_pblock_get (pb, SLAPI_ADD_ENTRY, &e);
322 slapi_entry_free(e);
}}}

New patch attached...

Thank you, Mark!!

Since this ticket is related to #48266, we should push this fix to 1.2.11.x, as well?

5538bac..622be8b master -> master
commit 622be8b
Author: Mark Reynolds mreynolds@redhat.com
Date: Tue Sep 22 13:41:06 2015 -0400

1c127b4..99dbfb7 389-ds-base-1.3.4 -> 389-ds-base-1.3.4
commit 99dbfb7

c28b52f..61f3a05 389-ds-base-1.3.3 -> 389-ds-base-1.3.3
commit 61f3a05

318f897..8449e3b 389-ds-base-1.3.2 -> 389-ds-base-1.3.2
commit 8449e3b

e861b06..4eb33f3 389-ds-base-1.3.1 -> 389-ds-base-1.3.1
commit 4eb33f330c5f29c701c78faba5720f610f871c2a

3896e68..82b4347 389-ds-base-1.2.11 -> 389-ds-base-1.2.11
commit 82b4347

Replying to [comment:5 nhosoi]:

Thank you, Mark!!

Since this ticket is related to #48266, we should push this fix to 1.2.11.x, as well?

Yeah it needs to be in 1.2.11 for 48266 (sorry already pushed it)

Metadata Update from @mreynolds:
- Issue assigned to mreynolds
- Issue set to the milestone: 1.2.11.33

2 years ago

Login to comment on this ticket.

Metadata