Changeset 1fb72af in git


Ignore:
Timestamp:
2006-11-20T15:15:17Z (13 years ago)
Author:
Xuefer <xuefer@…>
Branches:
1.2, 1.3, 3.0, 3.1, 3.2, master, trunk
Children:
60e8edb
Parents:
b31a6c1
Message:

fix possible alloca() scope problem in lock

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@282 c26eb9a1-5813-0410-bd6c-c2e55f420ca7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lock.c

    r3201a50 r1fb72af  
    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.