this in the same capture frame. Could use se_alloc...
*/
#define BUFFER_SIZE 128
- buffer = g_malloc(BUFFER_SIZE);
+ buffer = ep_alloc(BUFFER_SIZE);
buffer[0] = 0;
A = ACN_DMP_ADT_EXTRACT_A(adt->flags);
proto_item_set_text(ti, "Mixed size data items");
break;
} /* of switch (D) */
- /* free our memory! */
- g_free(buffer);
return offset;
}
this in the same capture frame. Could use se_alloc...
*/
#define BUFFER_SIZE 128
- buffer = g_malloc(BUFFER_SIZE);
+ buffer = ep_alloc(BUFFER_SIZE);
buffer[0] = 0;
} /* of (x=0;x<adt->count;x++) */
break;
} /* of switch (D) */
- /* free our memory! */
- g_free(buffer);
return offset;
}
offset += 4; \
p = tvb_get_ptr(tvb,offset,i); \
len = ((i+4-1)/4)*4; \
- tmp = g_malloc(i+1); \
+ tmp = ep_malloc(i+1); \
memcpy(tmp, p, i); \
tmp[i] = '\0'; \
proto_tree_add_string(tree, field, tvb, offset-4, len+4, \
(void *)tmp); \
- g_free(tmp); \
offset += len; \
}
offset = dissect_ber_identifier(pinfo, tree, tvb, offset, &class, &pc, &ber_tag);
offset = dissect_ber_length(pinfo, tree, tvb, offset, &vb_length, &ind);
oid_buf = tvb_get_ptr(tvb, vb_value_start, vb_length);
- vb_oid = g_malloc((vb_length+1) * sizeof(gulong));
+ vb_oid = ep_malloc((vb_length+1) * sizeof(gulong));
vb_oid_length = oid_to_subid_buf(oid_buf, vb_length, vb_oid, ((vb_length+1) * sizeof(gulong)));
offset = offset + vb_length;
}
#endif /* HAVE_NET_SNMP */
}
- g_free(vb_oid);
break;
default: