I am having trouble with this code. It breaks at the free(q->izv) function and i get a debug error saying:
CRT detected that the application wrote to memory after end of heap buffer
I have no idea what that means so i would be grateful for any help I get.
typedef struct izvodjaci{
char *izv;
int broj;
struct izvodjaci *sled;
}IZV;
obrisi_i(IZV *p){
while (p){
IZV *q;
q = p;
p = p->sled;
if (!strcmp(q->izv,"UNKNOWN")) free(q->izv);
free(q);
}
}
Thanks in advance