O
Oodini
Hello,
I create a pointer, get some memory with calloc, but when I want to free
it, I get a run-time error.
Here is the code:
char *script;
script = scalloc(71,sizeof(char));
script="/cm {72 mul 2.54 div} def\n1 cm 1 cm scale\n0.014
setlinewidth\n0 setgray\n";
fprintf(image_file,script);
fclose(image_file);
// free(script);
image_file is defined elsewhere, and there isn't any problem with it.
Note: I read the FAQ at
http://www.eskimo.com/~scs/C-faq/top.html
Thanks for help.
And if my questions does irritate you, please don't respond...
I create a pointer, get some memory with calloc, but when I want to free
it, I get a run-time error.
Here is the code:
char *script;
script = scalloc(71,sizeof(char));
script="/cm {72 mul 2.54 div} def\n1 cm 1 cm scale\n0.014
setlinewidth\n0 setgray\n";
fprintf(image_file,script);
fclose(image_file);
// free(script);
image_file is defined elsewhere, and there isn't any problem with it.
Note: I read the FAQ at
http://www.eskimo.com/~scs/C-faq/top.html
Thanks for help.
And if my questions does irritate you, please don't respond...