[64268] trunk/base/src/registry2.0/entry.c
jmr at macports.org
jmr at macports.org
Sat Feb 27 18:38:47 PST 2010
Revision: 64268
http://trac.macports.org/changeset/64268
Author: jmr at macports.org
Date: 2010-02-27 18:38:44 -0800 (Sat, 27 Feb 2010)
Log Message:
-----------
error checking in entry_imaged and entry_installed
Modified Paths:
--------------
trunk/base/src/registry2.0/entry.c
Modified: trunk/base/src/registry2.0/entry.c
===================================================================
--- trunk/base/src/registry2.0/entry.c 2010-02-28 02:14:35 UTC (rev 64267)
+++ trunk/base/src/registry2.0/entry.c 2010-02-28 02:38:44 UTC (rev 64268)
@@ -366,14 +366,15 @@
entry_count = reg_entry_imaged(reg, name, version, revision, variants,
&entries, &error);
if (entry_count >= 0) {
- Tcl_Obj* resultObj;
Tcl_Obj** objs;
- list_entry_to_obj(interp, &objs, entries, entry_count, &error);
- resultObj = Tcl_NewListObj(entry_count, objs);
- Tcl_SetObjResult(interp, resultObj);
+ if (list_entry_to_obj(interp, &objs, entries, entry_count, &error)) {
+ Tcl_Obj* resultObj = Tcl_NewListObj(entry_count, objs);
+ Tcl_SetObjResult(interp, resultObj);
+ free(entries);
+ free(objs);
+ return TCL_OK;
+ }
free(entries);
- free(objs);
- return TCL_OK;
}
return registry_failed(interp, &error);
}
@@ -408,14 +409,15 @@
}
entry_count = reg_entry_installed(reg, name, &entries, &error);
if (entry_count >= 0) {
- Tcl_Obj* resultObj;
Tcl_Obj** objs;
- list_entry_to_obj(interp, &objs, entries, entry_count, &error);
- resultObj = Tcl_NewListObj(entry_count, objs);
- Tcl_SetObjResult(interp, resultObj);
+ if (list_entry_to_obj(interp, &objs, entries, entry_count, &error)) {
+ Tcl_Obj* resultObj = Tcl_NewListObj(entry_count, objs);
+ Tcl_SetObjResult(interp, resultObj);
+ free(entries);
+ free(objs);
+ return TCL_OK;
+ }
free(entries);
- free(objs);
- return TCL_OK;
}
return registry_failed(interp, &error);
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100227/66b0a5dd/attachment.html>
More information about the macports-changes
mailing list