Changeset 150 for branches/1.0/mem.c


Ignore:
Timestamp:
2006-09-10T02:30:09+02:00 (8 years ago)
Author:
moo
Message:

avoid crash when OOM on mem_realloc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.0/mem.c

    r112 r150  
    251251{ 
    252252    void *newp = xc_mem_malloc(mem, size); 
    253     if (p) { 
     253    if (p && newp) { 
    254254        memcpy(newp, p, size); 
    255255        xc_mem_free(mem, p); 
Note: See TracChangeset for help on using the changeset viewer.