mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-01 12:39:35 -05:00
ITS#3065: fix vector handling to ensure its free()able
This commit is contained in:
parent
1c1b2bb6ee
commit
859e282780
1 changed files with 6 additions and 8 deletions
|
|
@ -1183,8 +1183,8 @@ parse_qdescrs(const char **sp, int *code)
|
||||||
}
|
}
|
||||||
res = res1;
|
res = res1;
|
||||||
}
|
}
|
||||||
res[pos] = sval;
|
res[pos++] = sval;
|
||||||
pos++;
|
res[pos] = NULL;
|
||||||
parse_whsp(sp);
|
parse_whsp(sp);
|
||||||
} else {
|
} else {
|
||||||
LDAP_VFREE(res);
|
LDAP_VFREE(res);
|
||||||
|
|
@ -1193,7 +1193,6 @@ parse_qdescrs(const char **sp, int *code)
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
res[pos] = NULL;
|
|
||||||
parse_whsp(sp);
|
parse_whsp(sp);
|
||||||
return(res);
|
return(res);
|
||||||
} else if ( kind == TK_QDESCR ) {
|
} else if ( kind == TK_QDESCR ) {
|
||||||
|
|
@ -1311,8 +1310,8 @@ parse_oids(const char **sp, int *code, const int allow_quoted)
|
||||||
kind = get_token(sp,&sval);
|
kind = get_token(sp,&sval);
|
||||||
if ( kind == TK_BAREWORD ||
|
if ( kind == TK_BAREWORD ||
|
||||||
( allow_quoted && kind == TK_QDSTRING ) ) {
|
( allow_quoted && kind == TK_QDSTRING ) ) {
|
||||||
res[pos] = sval;
|
res[pos++] = sval;
|
||||||
pos++;
|
res[pos] = NULL;
|
||||||
} else {
|
} else {
|
||||||
*code = LDAP_SCHERR_UNEXPTOKEN;
|
*code = LDAP_SCHERR_UNEXPTOKEN;
|
||||||
LDAP_FREE(sval);
|
LDAP_FREE(sval);
|
||||||
|
|
@ -1341,8 +1340,8 @@ parse_oids(const char **sp, int *code, const int allow_quoted)
|
||||||
}
|
}
|
||||||
res = res1;
|
res = res1;
|
||||||
}
|
}
|
||||||
res[pos] = sval;
|
res[pos++] = sval;
|
||||||
pos++;
|
res[pos] = NULL;
|
||||||
} else {
|
} else {
|
||||||
*code = LDAP_SCHERR_UNEXPTOKEN;
|
*code = LDAP_SCHERR_UNEXPTOKEN;
|
||||||
LDAP_FREE(sval);
|
LDAP_FREE(sval);
|
||||||
|
|
@ -1357,7 +1356,6 @@ parse_oids(const char **sp, int *code, const int allow_quoted)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
res[pos] = NULL;
|
|
||||||
parse_whsp(sp);
|
parse_whsp(sp);
|
||||||
return(res);
|
return(res);
|
||||||
} else if ( kind == TK_BAREWORD ||
|
} else if ( kind == TK_BAREWORD ||
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue