Browse Source

NSM: Fix mem/fd leaks

Closes: #187
tags/non-daw-v1.2.0
Jonathan Moore Liles 8 years ago
parent
commit
1ef382fbbe
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      session-manager/src/nsmd.C

+ 6
- 0
session-manager/src/nsmd.C View File

@@ -906,6 +906,8 @@ save_session_file ( )
FILE *fp = fopen( session_file, "w+" );

free( session_file );
/* FIXME: handle errors. */

for ( std::list<Client*>::iterator i = client.begin();
@@ -1199,6 +1201,8 @@ load_session_file ( const char * path )
return ERR_CREATE_FAILED;
}

free( session_file );
session_path = strdup( path );

set_name( path );
@@ -1223,6 +1227,8 @@ load_session_file ( const char * path )
}
}

fclose(fp);
MESSAGE( "Commanding unneeded and dumb clients to quit" );
std::map<std::string,int> client_map;


Loading…
Cancel
Save