diff options
Diffstat (limited to 'firmware/buflib.c')
-rw-r--r-- | firmware/buflib.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/firmware/buflib.c b/firmware/buflib.c index 4b557eb59d..eccf8b057e 100644 --- a/firmware/buflib.c +++ b/firmware/buflib.c | |||
@@ -207,7 +207,11 @@ union buflib_data* handle_alloc(struct buflib_context *ctx) | |||
207 | * and the found handle, therefore we can update first_free_handle */ | 207 | * and the found handle, therefore we can update first_free_handle */ |
208 | ctx->first_free_handle = handle - 1; | 208 | ctx->first_free_handle = handle - 1; |
209 | 209 | ||
210 | /* We need to set the table entry to a non-NULL value to ensure that | ||
211 | * compactions triggered by an allocation do not compact the handle | ||
212 | * table and delete this handle. */ | ||
210 | handle->val = -1; | 213 | handle->val = -1; |
214 | |||
211 | return handle; | 215 | return handle; |
212 | } | 216 | } |
213 | 217 | ||
@@ -613,7 +617,6 @@ buffer_alloc: | |||
613 | { | 617 | { |
614 | goto buffer_alloc; | 618 | goto buffer_alloc; |
615 | } else { | 619 | } else { |
616 | handle->val=1; | ||
617 | handle_free(ctx, handle); | 620 | handle_free(ctx, handle); |
618 | return -2; | 621 | return -2; |
619 | } | 622 | } |