diff --git a/lustre/lov/lov_qos.c b/lustre/lov/lov_qos.c
index aa3f288d623dac222593ccde46cc98c505ecc583..f3b9040e24b1de2980310ec8a40ad3aaa5d0f3f7 100644
--- a/lustre/lov/lov_qos.c
+++ b/lustre/lov/lov_qos.c
@@ -859,7 +859,7 @@ int qos_prep_create(struct obd_export *exp, struct lov_request_set *set)
         struct obdo *src_oa = set->set_oi->oi_oa;
         struct obd_trans_info *oti = set->set_oti;
         int i, stripes, rc = 0, newea = 0;
-        int *idx_arr, idx_cnt = 0;
+        int *idx_arr = NULL, idx_cnt = 0;
         int flag = LOV_USES_ASSIGNED_STRIPE;
         ENTRY;