Changes in aim.c [9854278:34509d5]
Legend:
- Unmodified
- Added
- Removed
-
aim.c
r9854278 r34509d5 948 948 949 949 if (modname) { 950 if (!(filename = malloc(strlen(priv->aimbinarypath)+1+strlen(modname)+4+1))) {950 if (!(filename = owl_malloc(strlen(priv->aimbinarypath)+1+strlen(modname)+4+1))) { 951 951 /* perror("memrequest: malloc"); */ 952 952 return -1; … … 954 954 sprintf(filename, "%s/%s.ocm", priv->aimbinarypath, modname); 955 955 } else { 956 if (!(filename = malloc(strlen(priv->aimbinarypath)+1+strlen(defaultmod)+1))) {956 if (!(filename = owl_malloc(strlen(priv->aimbinarypath)+1+strlen(defaultmod)+1))) { 957 957 /* perror("memrequest: malloc"); */ 958 958 return -1; … … 964 964 if (!modname) { 965 965 /* perror("memrequest: stat"); */ 966 free(filename);966 owl_free(filename); 967 967 return -1; 968 968 } … … 986 986 int i; 987 987 988 free(filename); /* not needed */988 owl_free(filename); /* not needed */ 989 989 owl_function_error("getaimdata memrequest: recieved invalid request for 0x%08lx bytes at 0x%08lx (file %s)\n", len, offset, modname); 990 990 i = 8; … … 993 993 } 994 994 995 if (!(buf = malloc(i))) {995 if (!(buf = owl_malloc(i))) { 996 996 return -1; 997 997 } … … 1017 1017 *buflenret = i; 1018 1018 } else { 1019 if (!(buf = malloc(len))) {1020 free(filename);1019 if (!(buf = owl_malloc(len))) { 1020 owl_free(filename); 1021 1021 return -1; 1022 1022 } … … 1024 1024 if (!(f = fopen(filename, "r"))) { 1025 1025 /* perror("memrequest: fopen"); */ 1026 free(filename);1027 free(buf);1026 owl_free(filename); 1027 owl_free(buf); 1028 1028 return -1; 1029 1029 } 1030 1030 1031 free(filename);1031 owl_free(filename); 1032 1032 1033 1033 if (fseek(f, offset, SEEK_SET) == -1) { 1034 1034 /* perror("memrequest: fseek"); */ 1035 1035 fclose(f); 1036 free(buf);1036 owl_free(buf); 1037 1037 return -1; 1038 1038 } … … 1041 1041 /* perror("memrequest: fread"); */ 1042 1042 fclose(f); 1043 free(buf);1043 owl_free(buf); 1044 1044 return -1; 1045 1045 } … … 1076 1076 if (priv->aimbinarypath && (getaimdata(sess, &buf, &buflen, offset, len, modname) == 0)) { 1077 1077 aim_sendmemblock(sess, fr->conn, offset, buflen, buf, AIM_SENDMEMBLOCK_FLAG_ISREQUEST); 1078 free(buf);1078 owl_free(buf); 1079 1079 } else { 1080 1080 owl_function_debugmsg("faimtest_memrequest: unable to use AIM binary (\"%s/%s\"), sending defaults...\n", priv->aimbinarypath, modname); … … 1342 1342 int z; 1343 1343 1344 newbuf = malloc(i+1);1344 newbuf = owl_malloc(i+1); 1345 1345 for (z = 0; z < i; z++) 1346 1346 newbuf[z] = (z % 10)+0x30; 1347 1347 newbuf[i] = '\0'; 1348 1348 /* aim_send_im(sess, userinfo->sn, AIM_IMFLAGS_ACK | AIM_IMFLAGS_AWAY, newbuf); */ 1349 free(newbuf);1349 owl_free(newbuf); 1350 1350 } 1351 1351 } else if (strstr(tmpstr, "seticqstatus")) {
Note: See TracChangeset
for help on using the changeset viewer.