]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/oidm.c
address ITS#4332; might remove dynamicObject counting
[openldap] / servers / slapd / oidm.c
index 25407644a495490c64e336492fde6bf2b787ec55..0bc6f53102d32896b7c1c0101d8d258b1fa0a7aa 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2005 The OpenLDAP Foundation.
+ * Copyright 1998-2006 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -119,9 +119,9 @@ usage:      fprintf( stderr, "\tObjectIdentifier <name> <oid>\n");
                return 1;
        }
 
-       om = (OidMacro *) SLAP_MALLOC( sizeof(OidMacro) );
+       om = (OidMacro *) SLAP_CALLOC( sizeof(OidMacro), 1 );
        if( om == NULL ) {
-               Debug( LDAP_DEBUG_ANY, "parse_oidm: SLAP_MALLOC failed", 0, 0, 0 );
+               Debug( LDAP_DEBUG_ANY, "parse_oidm: SLAP_CALLOC failed", 0, 0, 0 );
                return 1;
        }
 
@@ -156,7 +156,7 @@ void oidm_unparse( BerVarray *res, OidMacro *start, OidMacro *end, int sys )
 {
        OidMacro *om;
        int i, j, num;
-       struct berval bv, *bva = NULL, idx;
+       struct berval *bva = NULL, idx;
        char ibuf[32], *ptr;
 
        if ( !start )