The Cornhuskers (11-10, 2-6 Big Ten) won for the first time in four conference home games.
Brandon Ubel had 14 points and 12 rebounds, and Gallegos added 11 points.
Ubel made two free throws and converted Gallegos' pass through the lane into a dunk at the front end of a 16-7 spurt that gave Nebraska a double-digit lead in the middle of the second half. Gallegos followed Shavon Shields' three-point play with three straight 3s to make it 44-33.
adidas Men's Nebraska Cornhuskers Fired Up Scarlet Performance T-ShirtPrice: $21.99 Shop
Leaving early for the NBA is a risky decision. Some players -- Skal Labissiere, Dejounte Murray -- slid in the draft. Some -- Isaiah Taylor, Troy Williams -- weren't drafted at all.
College basketball coaches across the country will hit the recruiting trail hard in July to target the Class of 2017's top prospects. Which players are the nation's top programs targeting?
The Tar Heels could lose Justin Jackson and Kennedy Meeks after next season. Coach Roy Williams has nearly every top-10 2017 prospect on his board.