Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
0c59b2a4
Commit
0c59b2a4
authored
May 11, 2000
by
Andreas Gustafsson
Browse files
dst_key_fromdns() assigned to *keyp even though it returned an error
parent
65c21f5f
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/dns/sec/dst/dst_api.c
View file @
0c59b2a4
...
...
@@ -19,7 +19,7 @@
/*
* Principal Author: Brian Wellington
* $Id: dst_api.c,v 1.3
3
2000/05/1
0 18:54:0
4 gson Exp $
* $Id: dst_api.c,v 1.3
4
2000/05/1
1 02:11:4
4 gson Exp $
*/
#include
<config.h>
...
...
@@ -427,6 +427,7 @@ dst_key_fromdns(const char *name, isc_buffer_t *source, isc_mem_t *mctx,
isc_uint8_t
alg
,
proto
;
isc_uint32_t
flags
,
extflags
;
isc_result_t
ret
;
dst_key_t
*
key
=
NULL
;
RUNTIME_CHECK
(
isc_once_do
(
&
once
,
initialize
)
==
ISC_R_SUCCESS
);
REQUIRE
(
name
!=
NULL
);
...
...
@@ -452,14 +453,18 @@ dst_key_fromdns(const char *name, isc_buffer_t *source, isc_mem_t *mctx,
flags
|=
(
extflags
<<
16
);
}
*
key
p
=
get_key_struct
(
name
,
alg
,
flags
,
proto
,
0
,
mctx
);
if
(
*
key
p
==
NULL
)
key
=
get_key_struct
(
name
,
alg
,
flags
,
proto
,
0
,
mctx
);
if
(
key
==
NULL
)
return
(
ISC_R_NOMEMORY
);
ret
=
(
*
keyp
)
->
func
->
from_dns
(
*
keyp
,
source
,
mctx
);
if
(
ret
!=
ISC_R_SUCCESS
)
dst_key_free
((
*
keyp
));
return
(
ret
);
ret
=
key
->
func
->
from_dns
(
key
,
source
,
mctx
);
if
(
ret
!=
ISC_R_SUCCESS
)
{
dst_key_free
(
key
);
return
(
ret
);
}
*
keyp
=
key
;
return
(
ISC_R_SUCCESS
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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