Voldemort didn't invent Horcruxing technology. It already existed when he asked Prof. Slughorn about it. So, he knew that Slughorn could be the weakest point of his plan from where his secret could be revealed. Why didn't he clear this weak point? Why did he take the risk of keeping Slughorn alive?
First of all, he learned about Horcruxes from reading books and otherwise researching, NOT from Slughorn. All that Slughorn told him was confirmation that it was indeed possible to create seven Horcruxes (even the #7 was Riddle's own idea).
Second of all, he assumed that nobody knew that he actually created any. If you recall, he didn't even put any magical alarms around any of them.
So Slughorn wasn't really as much of a threat to him.
First of all, the chances of anyone learning that they needed to talk to Slughorn about the Horcruxes and Voldemort were non-existant.
Second, if they already spoke to Slughorn, they would know about Horcruxes so wouldn't learn anything majorly important (aside from #7)
Third, if you recall, Slughorn modified his memories. Being a Legilemens, Riddle quite possibly knew of that.
So why would Voldemort kill someone who was theoretically valuable to him (for his connections if no other reason) and presumably well disposed towards Tom Riddle from past history, if there was no legitimate threat?
To add to the existing answers:
Why kill a prominent member of the community? That would spark investigation into the murder. A risk which Voldemort was probably not willing to make, since he was still in hiding at this point; and was still able to use the element of surprise and drive his machinations from afar, without drawing too much attention to himself.
Voldemort did kill, and almost spontaneously sometimes. But consider this statement from HP7 (Bathilda's Secret) when Voldemort is approaching the Potters':
“Nice costume, mister!”
He saw the small boy’s smile falter as he ran near enough to see beneath the hood of the cloak, saw the fear cloud his painted face: Then the child turned and ran away. . . . Beneath the robe he fingered the handle of his wand. . . . One simple movement and the child would never reach his mother . . . but unnecessary, quite unnecessary. . . .
-Harry Potter and The Deathly Hallows, Chapter Seventeen (Bathilda's Secret).
He did not kill if it was unnecessary, which killing Slughorn would have been [I believe].
I think in the books Slughorn says that Voldemort has been trying to recruit him. As a former Head of Slytherin house and a Professor who looked kindly upon him and chose him as one of his 'favourites' then he probably felt that Slughorn could be turned to his side quite easily. In that instance, Horace would have been a valuable ally. He was a powerful enough wizard who had ties to other influential people and those contacts could prove invaluable. Another reason could be that he perhaps knew of Slughorn's slight propensity to cowardice and that he would be no real threat. If he did underestimate Slughorn's capacity for bravery then he would have been surprised in the final battle at Hogwarts! A fundamental issue is of course that Voldemort would not have been prepared for Slughorn's fondness of Lily causing him to 'spill the beans' and give Dumbledore the key memory that unlocked the mystery to Voldemort's continued existence and how to finally defeat him. Again Voldemort's inability to understand love was his undoing.
Slughorn also wanted their discussion of Horcruxes kept secret.
When the Dark Lord asked Slughorn about Horcruxes, Slughorn told him to keep it quiet - Slughorn didn’t want anyone finding out that they’d talked about Horcruxes any more than he did.
“Of course,’ he muttered, ‘this is all hypothetical, what we’re discussing, isn’t it? All academic …’
‘Yes, sir, of course,’ said Riddle quickly.
‘But all the same, Tom … keep it quiet, what I’ve told – that’s to say, what we’ve discussed. People wouldn’t like to think we’ve been chatting about Horcruxes. It’s a banned subject at Hogwarts, you know … Dumbledore’s particularly fierce about it …”
- Harry Potter and the Half-Blood Prince, Chapter 23 (Horcruxes)
Knowing this, the Dark Lord would see no reason to kill Slughorn. Slughorn wasn’t a danger - he wanted the Horcrux conversation kept a secret just as much. When Harry tried finding out, Slughorn didn’t willingly tell him, and very much denied everything to do with the conversation.
“Sir,’ said Harry desperately, ‘I just thought there might be a bit more to the memory –’
‘Did you?’ said Slughorn. ‘Then you were wrong, weren’t you? WRONG!”
- Harry Potter and the Half-Blood Prince, Chapter 18 (Birthday Surprises)
The only reason Harry was able to get the information from Slughorn was his use of Felix Felicis, and only Dumbledore knew Slughorn would even have information. From what the Dark Lord knew, there was really no reason to kill Slughorn - it would be unnecessary and not very useful.
Voldemort valued magical talent, and wanted Slughorn to teach the next generation of Pure-blood wizards
Once the school had been taken over by Lord Voldemort, with Severus Snape as Headmaster and the Death Eater Carrows taking key roles in subjugating staff and pupils, Slughorn learned that Voldemort had nothing worse in store for him than to remain in post and teach pure- and half-bloods. This he did, keeping his profile as low as he dared, though never enforcing the violent discipline advocated by the Carrows, and attempting to look after the students in his care as best he could.
Pottermore - Horace Slughorn (behind paywall)
The conclusion from the linked question is that "it didn't help Voldemort in the least" - Slughorn only confirmed what Voldemort already knew (e.g. the fact that you have to kill people to make them). The main thing that Voldemort wanted to know is how many Horcruxes you could make, and Slughorn was too horrified by the question even consider it (far less answer).
Recall that Slughorn was deeply ashamed of the fact that he gave Voldemort any information at all, and that their "theoretical discussion" wasn't so theoretical after all. That being said, it took considerable effort for Harry and Dumbledore to find out what Slughorn told Voldemort, and that was only after Dumbledore had found out both about the existence of the Horcruxes and about the general idea of the conversation. (If they didn't know those two facts, they probably wouldn't have even thought of interrogating Slughorn, and Slughorn wasn't exactly eager to volunteer the information). Eventually, in a move that was possibly coercive, Harry had to use Liquid Luck to get Slughorn to tell him what he wanted to know.
Perhaps Voldemort was counting on Slughorn's reluctance to share the information, and perhaps he was counting on people just not thinking to interrogate Slughorn. (He was shocked to find out towards the end of the 7th book that Harry knew about the Horcruxes and had already managed to destroy some). It could also reflect Voldemort's basic arrogance.
It's also possible that Voldemort simply wasn't aware that Slughorn knew about the horcruxes. It's not even clear from the books exactly how Slughorn found out that Voldemort had made them. Voldemort's shock at realizing that Harry knew about his Horcruxes in the 7th book would strongly suggest that Voldemort didn't know that anyone but him was aware of it.