[IOT-2344] Use correct index when checking for alloc failure.
[IOT-2344] Use correct index when checking for alloc failure.

dimensions[0] and i may be different values.  The urlInfo is allocated
to dimensions[0] but checked against i.

Bug: https://jira.iotivity.org/browse/IOT-2344
Change-Id: Ibff3fc62d551417a71e7496027452b3d88cad413
Signed-off-by: Todd Malsbary <8856a5d8416dae6d0ae52d024d7a973f628fb21e@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20271
Reviewed-by: Srikrishna Gurugubelli <1c6249d53dc965170385b925324d6cd5157f3ac5@microsoft.com>
Tested-by: jenkins-iotivity <d95b56ce41a2e1ac4cecdd398defd7414407cc08@iotivity.org>
Reviewed-by: Dan Mihai <ba8e1833495515b49ded9e20cae80a8129155aa9@microsoft.com>
Reviewed-by: Ashok Babu Channa <72ac47ef856ca3d131a57cba474ebed48591eeff@samsung.com>
Reviewed-by: Uze Choi <3a26c91d8a4a3c9e246e43339f4782bb2483aece@samsung.com>
Reviewed-by: Phil Coval <ff46fec9739d31cce915aabcc3a7a2c00eee4d6c@osg.samsung.com>

rzr/iotivity,rzr/iotivity,iotivity/iotivity,rzr/iotivity,iotivity/iotivity,rzr/iotivity,rzr/iotivity,iotivity/iotivity,iotivity/iotivity,iotivity/iotivity,rzr/iotivity,iotivity/iotivity,rzr/iotivity,iotivity/iotivity,iotivity/iotivity