DORMANTno replies

[PATCH 8/13] DAPL v2.0: dat: add check for NULL handle on IA calls

From: Davis, Arlin R <hidden>
Date: 2012-01-13 23:55:40
Subsystem: the rest · Maintainer: Linus Torvalds

check added to dats_get_ia_handle()

Signed-off-by: Arlin Davis <redacted>
---
 dat/common/dat_api.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/dat/common/dat_api.c b/dat/common/dat_api.c
index 4e6eadd..f53ead7 100755
--- a/dat/common/dat_api.c
+++ b/dat/common/dat_api.c
@@ -178,6 +178,9 @@ dats_get_ia_handle(IN DAT_IA_HANDLE handle, OUT DAT_IA_HANDLE * ia_handle_p)
 {
 	DAT_RETURN dat_status = DAT_SUCCESS;
 
+	if (handle == NULL)
+		return DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_IA);
+
 	/* handle to vector */
 	if (DAT_IA_HANDLE_TO_UL(handle) >= g_hv.handle_max) {
 		unsigned long i;
-- 
1.7.3



�{.n�+�������+%��lzwm��b�맲��r��zX��ݙ�����ܨ}���Ơz�&j:+v����n�r��6;靫3��\
nnX��f�z��2�ޙ���&�)ߡ�a����
�G���h��j:+v���w�٥
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help