diff options
-rw-r--r-- | apps/tagcache.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c index bf23ac74dc..37f443e036 100644 --- a/apps/tagcache.c +++ b/apps/tagcache.c | |||
@@ -326,7 +326,10 @@ static void allocate_tempbuf(void) | |||
326 | if (tempbuf) | 326 | if (tempbuf) |
327 | tempbuf_size = size; | 327 | tempbuf_size = size; |
328 | #else /* !__PCTOOL__ */ | 328 | #else /* !__PCTOOL__ */ |
329 | tempbuf_handle = core_alloc_maximum("tc tempbuf", &size, NULL); | 329 | /* Need to pass dummy ops to prevent the buffer being moved |
330 | * out from under us, since we yield during the tagcache commit. */ | ||
331 | static struct buflib_callbacks dummy_ops; | ||
332 | tempbuf_handle = core_alloc_maximum("tc tempbuf", &size, &dummy_ops); | ||
330 | if (tempbuf_handle > 0) | 333 | if (tempbuf_handle > 0) |
331 | { | 334 | { |
332 | tempbuf = core_get_data(tempbuf_handle); | 335 | tempbuf = core_get_data(tempbuf_handle); |