profiling: stop smbprofile from growing unnecessarily
authorDylan Stephano-Shachter <dshachter@nasuni.com>
Mon, 14 Jan 2019 18:42:03 +0000 (13:42 -0500)
committerJeremy Allison <jra@samba.org>
Wed, 16 Jan 2019 01:01:55 +0000 (02:01 +0100)
Signed-off-by: Dylan Stephano-Shachter <dshachter@nasuni.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jan 16 02:01:55 CET 2019 on sn-devel-144

source3/profile/profile.c

index 5deef81b6df15dad6206511bfd0dda545e38aad8..5e7b69d25d6ea0139eba7a0e5f9af36890fbd0ef 100644 (file)
@@ -271,6 +271,11 @@ void smbprofile_dump(void)
 
        TALLOC_FREE(smbprofile_state.internal.te);
 
+       if (! (smbprofile_state.config.do_count ||
+              smbprofile_state.config.do_times)) {
+                       return;
+       }
+
        if (smbprofile_state.internal.db == NULL) {
                return;
        }