Changeset 150 for trunk

Show
Ignore:
Timestamp:
09/10/2006 02:30:09 AM (7 years ago)
Author:
moo
Message:

avoid crash when OOM on mem_realloc

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/mem.c

    r148 r150  
    255255{ 
    256256    void *newp = xc_mem_malloc(mem, size); 
    257     if (p) { 
     257    if (p && newp) { 
    258258        memcpy(newp, p, size); 
    259259        xc_mem_free(mem, p);