Today I purchased a 2001 BMW 325i. I drove it back home (about 100 miles) and everything was fine. It ran great until later tonight.  I was driving it around town when I started to smell gas.  I didn't think much of it because I figured it could have been another vehicle.  I drove it for a few more blocks and then the EML indicator light came on, along with a few other lights.  I instantly lost power and the car died.  I was able to restart the car and limp it home at about 5 mph.  When I got home, there was a strong smell of gas and upon further inspection I found there was a gas leak about midway underneath the car.  Could  these two problems be related?  Any help would be much appreciated.