Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
openldap
OpenLDAP
Commits
6baa9b1e
Commit
6baa9b1e
authored
Aug 31, 2004
by
Jong Hyuk Choi
Browse files
use ch_malloc for normailzed values
parent
e6df9494
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/schema_init.c
View file @
6baa9b1e
...
...
@@ -1636,7 +1636,7 @@ telephoneNumberNormalize(
/* validator should have refused an empty string */
assert
(
val
->
bv_len
);
q
=
normalized
->
bv_val
=
slap_sl
_malloc
(
val
->
bv_len
+
1
,
ctx
);
q
=
normalized
->
bv_val
=
ch
_malloc
(
val
->
bv_len
+
1
);
for
(
p
=
val
->
bv_val
;
*
p
;
p
++
)
{
if
(
!
(
ASCII_SPACE
(
*
p
)
||
*
p
==
'-'
))
{
...
...
@@ -2045,7 +2045,7 @@ numericStringNormalize(
assert
(
val
->
bv_len
);
normalized
->
bv_val
=
slap_sl
_malloc
(
val
->
bv_len
+
1
,
ctx
);
normalized
->
bv_val
=
ch
_malloc
(
val
->
bv_len
+
1
);
p
=
val
->
bv_val
;
q
=
normalized
->
bv_val
;
...
...
@@ -2672,7 +2672,7 @@ generalizedTimeNormalize(
}
len
=
sizeof
(
"YYYYmmddHHMMSSZ"
)
-
1
+
fraction
.
bv_len
;
normalized
->
bv_val
=
slap_sl
_malloc
(
len
+
1
,
ctx
);
normalized
->
bv_val
=
ch
_malloc
(
len
+
1
);
if
(
normalized
->
bv_val
==
NULL
)
{
return
LBER_ERROR_MEMORY
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment