]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/oidm.c
cleanup
[openldap] / servers / slapd / oidm.c
index 3c93c3ef41d8991c723173de3487272d958e13c5..24ed7d1b217d0acf3ec978afd3eaf2e82b100497 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
@@ -100,13 +100,14 @@ parse_oidm(
        OidMacro **rom)
 {
        char *oid;
-       OidMacro *om;
+       OidMacro *om = NULL;
        struct berval bv;
 
        if (argc != 3) {
                fprintf( stderr, "%s: line %d: too many arguments\n",
                        fname, lineno );
 usage: fprintf( stderr, "\tObjectIdentifier <name> <oid>\n");
+               if (om) SLAP_FREE( om );
                return 1;
        }
 
@@ -116,6 +117,7 @@ usage:      fprintf( stderr, "\tObjectIdentifier <name> <oid>\n");
                        "%s: line %d: "
                        "ObjectIdentifier \"%s\" previously defined \"%s\"",
                        fname, lineno, argv[1], oid );
+               SLAP_FREE( oid );
                return 1;
        }