rem: char *result = pkg_malloc(buf.len*3+1);
add: char *result;
context: encodeQuopri(str buf){    char *result = pkg_malloc(buf.len*3+1);    int i, j;    char c;    result = pkg_malloc(buf.len*3+1);    if (!result) {        LOG(L_ERR, "error: mediaproxy/encodeQuopri(): out of memory\n");        return NULL;    }    for (i=0, j=0; i<buf.len; i++) {        c = buf.s[i];        if ((c>0x20 && c<0x7f && c!='=') || c=='\n' || c=='\r') {            result[j++] = c;        } else {            result[j++] = '=';            sprintf(&result[j], "%02X", (c & 0xff));            j += 2;        }    }    result[j] = 0;    return result;}