* The SetMachinedefaults() has been changed to reflect this.
* pray for us and may we attain enlightenment through structures.
*/
+
+
+ if(name) {
+ /* info did not come from SetMachineDefaults(), which does not
+ * initialize entry 8 (M_STAT_CHNG), therefore we can
+ * free it.
+ */
+ /* This is an update of an existing machine and the structure
+ * was filled in thru a query to the db which does fill in this
+ * field.
+ */
free(info[8]);
- info[8] = info[M_SUBNET];
- info[9] = info[M_ADDR];
- info[10] = info[M_OWNER_TYPE];
- info[11] = info[M_OWNER_NAME];
- info[12] = info[M_ACOMMENT];
- info[13] = info[M_OCOMMENT];
+ }
+
+ info[8] = info[M_SUBNET];
+ info[9] = info[M_ADDR];
+ info[10] = info[M_OWNER_TYPE];
+ info[11] = info[M_OWNER_NAME];
+ info[12] = info[M_ACOMMENT];
+ info[13] = info[M_OCOMMENT];
if(name)
if (GetValueFromUser("Machine's network (or 'none')", &info[8])