Browse Source

Remove memory leak.

Georgi Chorbadzhiyski 9 years ago
parent
commit
5e7b823941
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      tomcast.c

+ 1
- 0
tomcast.c View File

1011
 			RESTREAMER *nr = new_restreamer(c->name, c);
1011
 			RESTREAMER *nr = new_restreamer(c->name, c);
1012
 			if (nr->clientsock < 0) {
1012
 			if (nr->clientsock < 0) {
1013
 				LOGf("Error creating proxy socket for %s\n", c->name);
1013
 				LOGf("Error creating proxy socket for %s\n", c->name);
1014
+				free_restreamer(nr);
1014
 			} else {
1015
 			} else {
1015
 				list_add(restreamer, nr);
1016
 				list_add(restreamer, nr);
1016
 				if (pthread_create(&nr->thread, NULL, &proxy_ts_stream, nr) == 0) {
1017
 				if (pthread_create(&nr->thread, NULL, &proxy_ts_stream, nr) == 0) {

Loading…
Cancel
Save