Set rsp to NULL before calling the conversation function, so we can

later detect if it hasn't been touched.

Sponsored by:	DARPA, NAI Labs


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@130 185d5e19-27fe-0310-9dcf-9bff6b9f3609
This commit is contained in:
Dag-Erling Smørgrav 2002-04-17 07:26:16 +00:00
parent ad8d33ef88
commit c51f824179
1 changed files with 2 additions and 1 deletions

View File

@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $P4: //depot/projects/openpam/lib/pam_vprompt.c#5 $
* $P4: //depot/projects/openpam/lib/pam_vprompt.c#6 $
*/
#include <stdarg.h>
@ -72,6 +72,7 @@ pam_vprompt(pam_handle_t *pamh,
msg.msg_style = style;
msg.msg = msgbuf;
msgp = &msg;
rsp = NULL;
r = (conv->conv)(1, &msgp, &rsp, conv->appdata_ptr);
*resp = rsp == NULL ? NULL : rsp->resp;
free(rsp);