/* this octet string contains an NT SID */
sid_tvb=tvb_new_subset(tvb, offset, len, len);
dissect_nt_sid(sid_tvb, 0, tree, "SID", &tmpstr, hf_index);
- ldapvalue_string=ep_strdup(tmpstr);
- g_free(tmpstr);
+ ldapvalue_string=tmpstr;
goto finished;
} else if ( (len==16) /* GUIDs are always 16 bytes */
/* this octet string contains an NT SID */
dissect_nt_sid(tvb, 0, tree, "SID", &tmpstr, hf_ldap_sid);
- ldapvalue_string=ep_strdup(tmpstr);
- g_free(tmpstr);
+ ldapvalue_string=tmpstr;
}
static void
/* this octet string contains an NT SID */
sid_tvb=tvb_new_subset(tvb, offset, len, len);
dissect_nt_sid(sid_tvb, 0, tree, "SID", &tmpstr, hf_index);
- ldapvalue_string=ep_strdup(tmpstr);
- g_free(tmpstr);
+ ldapvalue_string=tmpstr;
goto finished;
} else if ( (len==16) /* GUIDs are always 16 bytes */
/*--- End of included file: packet-ldap-fn.c ---*/
-#line 539 "packet-ldap-template.c"
+#line 538 "packet-ldap-template.c"
static void
dissect_ldap_payload(tvbuff_t *tvb, packet_info *pinfo,
/* this octet string contains an NT SID */
dissect_nt_sid(tvb, 0, tree, "SID", &tmpstr, hf_ldap_sid);
- ldapvalue_string=ep_strdup(tmpstr);
- g_free(tmpstr);
+ ldapvalue_string=tmpstr;
}
static void
"ldap.OCTET_STRING", HFILL }},
/*--- End of included file: packet-ldap-hfarr.c ---*/
-#line 1596 "packet-ldap-template.c"
+#line 1594 "packet-ldap-template.c"
};
/* List of subtrees */
&ett_ldap_ExtendedResponse,
/*--- End of included file: packet-ldap-ettarr.c ---*/
-#line 1607 "packet-ldap-template.c"
+#line 1605 "packet-ldap-template.c"
};
module_t *ldap_module;
-/* TODO: dissect_nt_sid() should be changed to return ep memory
- * and not gmalloc memory.
- */
/* packet-windows-common.c
* Routines for dissecting various Windows data types
*
if(sid_str){
if(sid_name){
- *sid_str = g_strdup_printf("%s (%s)", sid_string, sid_name);
+ *sid_str = ep_strdup_printf("%s (%s)", sid_string, sid_name);
} else {
- *sid_str = g_strdup(sid_string);
+ *sid_str = ep_strdup(sid_string);
}
}
}
if(sid_str && !(*sid_str)){
- *sid_str=g_strdup("corrupted sid");
+ *sid_str=ep_strdup("corrupted sid");
}
return offset;
item, "%s, flags 0x%02x, %s, mask 0x%08x", sid_str, flags,
val_to_str(type, ace_type_vals, "Unknown ACE type (0x%02x)"),
perms);
- if(sid_str){
- g_free(sid_str);
- }
break;
};