Release the chain of blocks used for pool allocations. */
| 466 | |
| 467 | /* Release the chain of blocks used for pool allocations. */ |
| 468 | void poolAllocRelease(RedisModuleCtx *ctx) { |
| 469 | RedisModulePoolAllocBlock *head = ctx->pa_head, *next; |
| 470 | |
| 471 | while(head != NULL) { |
| 472 | next = head->next; |
| 473 | zfree(head); |
| 474 | head = next; |
| 475 | } |
| 476 | ctx->pa_head = NULL; |
| 477 | } |
| 478 | |
| 479 | /* Return heap allocated memory that will be freed automatically when the |
| 480 | * module callback function returns. Mostly suitable for small allocations |
no test coverage detected