kernel/timer: change row_lvl to unsigned

Use signed int as array index is unsecure.
msh: check path is non-null in msh_auto_complete_path
msh: free is only available when HEAP is enabled
dfs: check for null reference
minilibc: only define malloc family when RT_USING_HEAP enabled
Merge pull request #353 from grissiom/misc-fix

Misc fix