tstorch / mongoose

Automatically exported from code.google.com/p/mongoose
MIT License
0 stars 0 forks source link

Crash when (double) freeing ssl_mutexes #361

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. call mg_start() with a certificate
2. stop mongoose
3. call again with NO certicate
4. stop mongoose => CRASH

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
official 3.1 on linux 2.6.38

Please provide any additional information below.

ssl_mutexes is a static and it was not reset to NULL after been freed, so 
another mg_start/stop will call again the free

#ifndef NO_SSL
  if (ssl_mutexes != NULL) {
    free(ssl_mutexes);
    ssl_mutexes = NULL; // FIX
  }
#endif // !NO_SSL

have fun :-)

Original issue reported on code.google.com by laurent....@gmail.com on 7 Jun 2012 at 11:28

GoogleCodeExporter commented 9 years ago
Submitted 05062be, thank you!

Original comment by valenok on 23 Sep 2012 at 1:19