Changeset 282


Ignore:
Timestamp:
2006-11-20T16:15:17+01:00 (8 years ago)
Author:
moo
Message:

fix possible alloca() scope problem in lock

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lock.c

    r62 r282  
    9292        } 
    9393        size = strlen(tmpdir) + sizeof("/.xcache.lock") - 1 + 3 * 10 + 100; 
    94         myname = do_alloca(size); 
     94        myname = malloc(size); 
    9595        snprintf(myname, size - 1, "%s%c.xcache.%d.%d.%d.lock", tmpdir, DEFAULT_SLASH, (int) getuid(), i ++, rand()); 
    9696        pathname = myname; 
     
    119119 
    120120    if (myname) { 
    121         free_alloca(myname); 
     121        free(myname); 
    122122    } 
    123123 
Note: See TracChangeset for help on using the changeset viewer.