net/bnxt: fix null dereference in session cleanup
[dpdk.git] / app / test / test_cryptodev_blockcipher.c
index 5688a45..4944591 100644 (file)
@@ -2,6 +2,8 @@
  * Copyright(c) 2015-2017 Intel Corporation
  */
 
+#ifndef RTE_EXEC_ENV_WINDOWS
+
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_mbuf.h>
@@ -805,20 +807,16 @@ error_exit:
                        rte_cryptodev_sym_session_clear(dev_id, sess);
                        rte_cryptodev_sym_session_free(sess);
                }
-               if (cipher_xform)
-                       rte_free(cipher_xform);
-               if (auth_xform)
-                       rte_free(auth_xform);
+               rte_free(cipher_xform);
+               rte_free(auth_xform);
        }
 
        if (op)
                rte_crypto_op_free(op);
 
-       if (obuf)
-               rte_pktmbuf_free(obuf);
+       rte_pktmbuf_free(obuf);
 
-       if (ibuf)
-               rte_pktmbuf_free(ibuf);
+       rte_pktmbuf_free(ibuf);
 
        return status;
 }
@@ -1221,3 +1219,5 @@ free_blockcipher_test_suite(struct unit_test_suite *ts)
 {
        free(ts);
 }
+
+#endif /* !RTE_EXEC_ENV_WINDOWS */