U.S. District Judge Sidney A. Fitzwater granted Mark Cuban's motion to dismiss an insider trading lawsuit on Friday. Fitzwater gave the Securities and Exchange Commission 30 days to file an amended complaint.

The SEC alleged Cuban was involved in insider trading when he sold shares in an Internet search engine company, Mamma.com Inc., after receiving confidential information about a private offering in 2004.

The SEC said Cuban avoided a loss of $750,000 by selling his 600,000 shares, which represented a 6.3 percent stake in the company.

Cuban's lawyers argued that the NBA team owner wasn't legally an "insider."