diff --git a/watchsyscall/wa_callbacks.c b/watchsyscall/wa_callbacks.c index d2006763b2ad0b660c63057a1039943297712528..8fc53b68c99dd4c539aba6a5cf27ff162dbdfeb3 100644 --- a/watchsyscall/wa_callbacks.c +++ b/watchsyscall/wa_callbacks.c @@ -245,9 +245,9 @@ int zipr_is_addr_ok(int ret, unsigned int to_check) { page_no++; #ifdef DEBUG_ADD - print_str_debug("checking page="); - print_int_debug((int)page_no); - print_str_debug("\n"); + print_str_debug("checking page="); + print_int_debug((int)page_no); + print_str_debug("\n"); #endif int i; for(i=0;i<al->pairs;i++) @@ -277,3 +277,19 @@ int zipr_is_addr_ok(int ret, unsigned int to_check) cgc_terminate(199); return 0; } + + +int zipr_delayed_deallocate(unsigned int ret_pc, reg_values_t rv) +{ + void *addr=rv.ebx; + unsigned int length=rv.ecx; + + static void* old_addr=0; + static unsigned int old_length=0; + + cgc_deallocate(old_addr,old_length); + + old_addr=addr; + old_length=length; + return 0; +}