Does anyone have any idea if this patch will be incorporated into version 5.2 when it is released?

Patch to NET-SNMP v.5.2rc3 attached. It also should work with previous versions.



diff -ru net-snmp-5.2.rc3/agent/helpers/table_dataset.c 
net-snmp-5.2.rc3_fixed/agent/helpers/table_dataset.c
--- net-snmp-5.2.rc3/agent/helpers/table_dataset.c      2004-10-21 23:42:48 
+0500
+++ net-snmp-5.2.rc3_fixed/agent/helpers/table_dataset.c        2004-12-01 
19:25:11 +0400
@@ -347,9 +347,14 @@
 netsnmp_table_data_set_clone_row(netsnmp_table_row *row)
 {
     netsnmp_table_data_set_storage *data, **newrowdata;
-    netsnmp_table_row *newrow = netsnmp_table_data_clone_row(row);
+    netsnmp_table_row *newrow;
 
-    if (!row || !newrow)
+    if (!row)
+        return NULL;
+
+    newrow = netsnmp_table_data_clone_row(row);
+
+    if (!newrow)
         return NULL;
 
     data = (netsnmp_table_data_set_storage *) row->data;
@@ -361,12 +366,14 @@
 
             memdup((u_char **) newrowdata, (u_char *) data,
                    sizeof(netsnmp_table_data_set_storage));
+           //BUG: must free memory allocated in this proc first
             if (!*newrowdata)
                 return NULL;
 
             if (data->data.voidp) {
                 memdup((u_char **) & ((*newrowdata)->data.voidp),
                        (u_char *) data->data.voidp, data->data_len);
+               //BUG: must free memory allocated in this proc first
                 if (!(*newrowdata)->data.voidp)
                     return NULL;
             }
@@ -747,6 +754,7 @@
                 if (newrowstash->deleted) {
                     netsnmp_table_dataset_remove_and_delete_row(datatable, 
newrow);
                 }
+               netsnmp_oid_stash_free(stashp,NULL);
             }
             break;
 


Reply via email to