I ran the test program on my Linux machine with valgrind and found a lot of memory leaks. They are also mentioned in issue #6
I fixed first the memory leaks in test.c itself, and in url.c afterwards.
Nota bene: I use now the %ms format specifier in sscanf() that is part of POSIX but not part of ISO C, so it might not work on MS Visual Studio, I guess. Perhaps these parts in the code should be changed if this is an issue.
Additionally, valgrind also found some other memory access violations, that are not (yet) fixed in my branch.
I ran the test program on my Linux machine with valgrind and found a lot of memory leaks. They are also mentioned in issue #6
I fixed first the memory leaks in test.c itself, and in url.c afterwards.
Nota bene: I use now the %ms format specifier in sscanf() that is part of POSIX but not part of ISO C, so it might not work on MS Visual Studio, I guess. Perhaps these parts in the code should be changed if this is an issue.
Additionally, valgrind also found some other memory access violations, that are not (yet) fixed in my branch.