ossp-pkg/cfg/cfg_main.c 1.5 -> 1.6
--- cfg_main.c 2002/08/02 19:07:12 1.5
+++ cfg_main.c 2002/11/09 14:15:55 1.6
@@ -60,9 +60,12 @@
(*cfg)->szError[0] = '\0';
(*cfg)->szErrorInfo[0] = '\0';
(*cfg)->rcErrorInfo = CFG_OK;
- if ((rc = cfg_grid_create(&((*cfg)->grid_nodes), sizeof(cfg_node_t), 512)) != CFG_OK)
+ if ((rc = cfg_grid_create(&((*cfg)->grid_nodes), sizeof(cfg_node_t), 512)) != CFG_OK) {
+ free(*cfg);
return rc;
+ }
if ((rc = cfg_grid_create(&((*cfg)->grid_tokens), 8192, 1)) != CFG_OK) {
+ free(*cfg);
cfg_grid_destroy((*cfg)->grid_nodes);
return rc;
}
|
|