From: David van Moolenbroek Date: Fri, 17 Jul 2015 19:36:58 +0000 (+0200) Subject: libmagic: free actual dsentry rather than a copy X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=40aba308a09f5e05d4fa36528a4b4beab65f83f1;p=minix.git libmagic: free actual dsentry rather than a copy This resolves an infinite loop during boot, in libblockdriver freeing DMA memory at the end of a partition(3) call. Change-Id: I0757aa48f769ea79eab7160f23ee4c97cf58e055 --- diff --git a/minix/llvm/static/magic/magic_mem.c b/minix/llvm/static/magic/magic_mem.c index 77b2eb203..d22a2f23f 100644 --- a/minix/llvm/static/magic/magic_mem.c +++ b/minix/llvm/static/magic/magic_mem.c @@ -853,7 +853,6 @@ PUBLIC void magic_destroy_dsentry(struct _magic_dsentry *dsentry, *===========================================================================*/ PUBLIC int magic_destroy_obdsentry_by_addr(void *data_ptr) { - struct _magic_dsentry _magic_dsentry_buff; struct _magic_sentry *sentry; struct _magic_dsentry *dsentry; struct _magic_obdsentry *obdsentry; @@ -862,7 +861,7 @@ PUBLIC int magic_destroy_obdsentry_by_addr(void *data_ptr) MAGIC_MEM_WRAPPER_LBEGIN(); /* Lookup the obdsentry. */ - sentry = magic_sentry_lookup_by_addr(data_ptr, &_magic_dsentry_buff); + sentry = magic_sentry_lookup_by_addr(data_ptr, NULL); if(!sentry || ((sentry->flags & obflags) != obflags)) { MAGIC_MEM_WRAPPER_LEND(); return MAGIC_EINVAL;