Fix for OFED BZ 2430.

These are compile issues associated with using the gcc 4.6.4 compiler:

Issues corrected:
- duplicate memory errors
- many used variable warnings