Skip to content
Snippets Groups Projects
Commit b06c2f0c authored by fptk's avatar fptk
Browse files

fix zonefree

parent 8a7b4bdd
No related branches found
No related tags found
No related merge requests found
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
void initZoneMessage(struct ZoneMessage *zm) void initZoneMessage(struct ZoneMessage *zm)
{ {
zm = malloc(sizeof(struct ZoneMessage));
zm->len = 0; zm->len = 0;
zm->data = NULL; zm->data = NULL;
} }
void freeZoneMessage(struct ZoneMessage *zm) void freeZoneMessage(struct ZoneMessage *zm)
{ {
if(zm->data != NULL) zm->data;
free(zm->data); free(zm);
} }
void setZoneMessage(struct ZoneMessage *zm, char *data, uint16_t length) void setZoneMessage(struct ZoneMessage *zm, char *data, uint16_t length)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment