mirror of
https://github.com/avrdudes/avrdude.git
synced 2026-09-29 04:18:54 +03:00
Add mmt_free() definition
This commit is contained in:
@@ -44,6 +44,7 @@ extern const char *pgmid; // Programmer -c string
|
||||
#define mmt_strdup(s) cfg_strdup(__func__, s)
|
||||
#define mmt_malloc(n) cfg_malloc(__func__, n)
|
||||
#define mmt_realloc(p, n) cfg_realloc(__func__, p, n)
|
||||
#define mmt_free(p) free(p)
|
||||
|
||||
int avrdude_message2(FILE *fp, int lno, const char *file, const char *func, int msgmode, int msglvl, const char *format, ...);
|
||||
|
||||
|
||||
@@ -539,7 +539,7 @@ static int jtagmkII_recv_frame(const PROGRAMMER *pgm, unsigned char **msg,
|
||||
msglen, MAX_MESSAGE);
|
||||
state = sSTART;
|
||||
headeridx = 0;
|
||||
} else if ((buf = malloc(msglen + 10)) == NULL) {
|
||||
} else if ((buf = malloc(msglen + 10)) == NULL) { // Sic! malloc is OK here
|
||||
pmsg_error("out of memory\n");
|
||||
ignorpkt++;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user