Date:2011-04-12 14:32:26 (12 years 11 months ago)
Author:Werner Almesberger
Commit:920fe3407f1c85b053a9ea48d8d9f19ef89bf115
Message:tools/lib/atnet.c (dialog_vsend): plugged memory leak

Files: tools/lib/atnet.c (2 diffs)

Change Details

tools/lib/atnet.c
3535{
3636    va_list ap2;
3737    char *buf;
38    int n;
38    int n, res;
3939
4040    va_copy(ap2, ap);
4141    n = vsnprintf(NULL, 0, fmt, ap2);
...... 
4949    vsprintf(buf, fmt, ap);
5050
5151    buf[n] = '\n';
52    if (netio_write(netio, buf, n+1) < 0)
53        return -1;
54    return 0;
52    res = netio_write(netio, buf, n+1);
53    free(buf);
54
55    return res < 0 ? -1 : 0;
5556}
5657
5758

Archive Download the corresponding diff file



interactive