]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-monitor/time.c
Plug memory leak
[openldap] / servers / slapd / back-monitor / time.c
index 34465869e4840bbc6a74a534d50267057146b077..abc29e366a4624101b3a67fac7de97ee81a08638 100644 (file)
@@ -37,6 +37,8 @@
 #include <ac/string.h>
 #include <ac/time.h>
 
+#include <lutil.h>
+
 #include "slap.h"
 #include "proto-slap.h"
 #include "back-monitor.h"
@@ -57,7 +59,7 @@ monitor_subsys_time_init(
        struct monitorentrypriv *mp;
        char                    buf[1024];
        struct tm               *tms;
-       char                    tmbuf[20];
+       char                    tmbuf[ LDAP_LUTIL_GENTIME_BUFSIZE ];
 
        /*
         * Note: ltmbuf, ltm are used only if HACK_LOCAL_TIME is defined
@@ -218,7 +220,8 @@ monitor_subsys_time_update(
        Entry                   *e
 )
 {
-       char            stmbuf[20], ctmbuf[20];
+       char            stmbuf[ LDAP_LUTIL_GENTIME_BUFSIZE ],
+                       ctmbuf[ LDAP_LUTIL_GENTIME_BUFSIZE ];
        struct tm       *stm, *ctm;
        Attribute       *a;
        ber_len_t       len;