faim_export int aim_send_im_ext(aim_session_t *sess, aim_conn_t *conn, struct aim_sendimext_args *args)
{
static const fu8_t deffeatures[] = {
- 0x01, 0x01, 0x01, 0x02, 0x42,
+ 0x01, 0x01, 0x01, 0x02
};
int i, msgtlvlen;
aim_frame_t *fr;
aim_tlv_t *miscinfo;
aim_bstream_t tbs;
- miscinfo = aim_gettlv(list2, 0x2711, 1);
+ if (!(miscinfo = aim_gettlv(list2, 0x2711, 1)))
+ return 0;
aim_bstream_init(&tbs, miscinfo->value, miscinfo->length);
args->info.icon.checksum = aimbs_get32(&tbs);
if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype)))
ret = userfunc(sess, rx, channel, sn, reason);
+ free(ck);
+ free(sn);
+
return ret;
}
fu16_t type;
fu8_t snlen, *ck;
char *sn;
+ int ret = 0;
ck = aimbs_getraw(bs, 8);
type = aimbs_get16(bs);
sn = aimbs_getstr(bs, snlen);
if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype)))
- return userfunc(sess, rx, type, sn);
+ ret = userfunc(sess, rx, type, sn);
free(sn);
free(ck);
- return 0;
+ return ret;
}
static int snachandler(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs)