No, this command

mktemp -d -p $tmp

Is creating a temporary dir inside the directory $tmp.  See man 1 mktemp for more information.