Update of /cvsroot/radmind/radmind-assistant/rsm
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv17106
Modified Files:
RAServerAuth.m RAServerController.m RSMLoadsetEditor.m
Log Message:
Fix three possible leaks.
Initialize execargs to NULL.
Index: RAServerAuth.m
===================================================================
RCS file: /cvsroot/radmind/radmind-assistant/rsm/RAServerAuth.m,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** RAServerAuth.m 24 Jun 2008 20:25:19 -0000 1.19
--- RAServerAuth.m 16 Jul 2008 03:19:44 -0000 1.20
***************
*** 104,108 ****
NSString *output = nil;
char buf[ MAXPATHLEN ];
! char **execargs;
NSMutableArray *av = nil;
NSString *authToolPath;
--- 104,108 ----
NSString *output = nil;
char buf[ MAXPATHLEN ];
! char **execargs = NULL;
NSMutableArray *av = nil;
NSString *authToolPath;
***************
*** 149,154 ****
if (( ac = [ av argv: &execargs ] ) == 0 ) {
! error = [ NSString stringWithFormat:
! @"chdir / failed: %s", strerror( errno ) ];
goto execute_command_cleanup;
}
--- 149,153 ----
if (( ac = [ av argv: &execargs ] ) == 0 ) {
! error = [ NSString stringWithString: @"argv creation failed" ];
goto execute_command_cleanup;
}
Index: RSMLoadsetEditor.m
===================================================================
RCS file: /cvsroot/radmind/radmind-assistant/rsm/RSMLoadsetEditor.m,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** RSMLoadsetEditor.m 24 Jun 2008 20:25:19 -0000 1.24
--- RSMLoadsetEditor.m 16 Jul 2008 03:19:44 -0000 1.25
***************
*** 1004,1013 ****
}
- newEntry = [ entry mutableCopy ];
-
if ( [ _allCommandFiles count ] != 1 ) {
return( NO );
}
[ allCommandFilesTable selectRow: 0 byExtendingSelection: NO ];
[ self setCurrentCommandFileName: [[ _allCommandFiles objectAtIndex: 0 ]
--- 1004,1013 ----
}
if ( [ _allCommandFiles count ] != 1 ) {
return( NO );
}
+ newEntry = [ entry mutableCopy ];
+
[ allCommandFilesTable selectRow: 0 byExtendingSelection: NO ];
[ self setCurrentCommandFileName: [[ _allCommandFiles objectAtIndex: 0 ]
***************
*** 1071,1075 ****
NSArray *items;
NSString *newPath, *oldPath;
! NSString *newstring = [ text copy ];
NSRange range;
id item;
--- 1071,1075 ----
NSArray *items;
NSString *newPath, *oldPath;
! NSString *newstring;
NSRange range;
id item;
***************
*** 1105,1108 ****
--- 1105,1109 ----
[ self moveCommandFileAtPath: oldPath toPath: newPath ];
} else if ( [ table isEqual: currentKFileTable ] ) {
+ newstring = [ text retain ];
items = _currentCommandFile;
if ( row >= [ items count ] ) {
Index: RAServerController.m
===================================================================
RCS file: /cvsroot/radmind/radmind-assistant/rsm/RAServerController.m,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** RAServerController.m 24 Jun 2008 20:25:19 -0000 1.24
--- RAServerController.m 16 Jul 2008 03:19:44 -0000 1.25
***************
*** 787,791 ****
int row;
NSMutableDictionary *dict;
! NSString *newstring = [ text copy ];
if (( row = [ tv editedRow ] ) < 0 ) {
--- 787,791 ----
int row;
NSMutableDictionary *dict;
! NSString *newstring;
if (( row = [ tv editedRow ] ) < 0 ) {
***************
*** 795,798 ****
--- 795,800 ----
return;
}
+
+ newstring = [ text retain ];
if ( ! [[ dict objectForKey: @"host" ] isEqualToString: newstring ] ) {
|