Normally, an imp familiar would follow the standard rules for devils
If it dies outside the Nine Hells, a devil disappears in a cloud of sulfurous smoke or dissolves into a pool of ichor, instantly returning to its home layer, where it reforms at full strength. Devils that die in the Nine Hells are destroyed forever—a fate that even Asmodeus fears. (MM - Devil)
and
If a devil dies somewhere other than the Nine Hells, it re-forms in the Nine Hells and is therefore not truly killed. However, a devil that is killed in the Nine Hells is dead forever; not surprisingly, that's why devils tend to be more cautious in their dealings at home than abroad. (Descent Into Avernus 8)
In Curse of Strahd, the NPC
Lady Fiona Wachter
has an imp familiar, Majesto.
Specifically in Barovia, souls cannot leave the place upon their body's death:
In Barovia, the souls of the dead are as trapped as the souls of the living. They become caught in the mists and can’t travel to the afterlife. (CoS 24)
Even the most powerful magic cannot change this:
No spell—not even wish—allows one to escape from Strahd's domain. Astral projection, teleport, plane shift, and similar spells cast for the purpose of leaving Barovia simply fail, as do effects that banish a creature to another plane of existence. These restrictions apply to magic items and artifacts that have properties that transport or banish creatures to other planes. (ibid)
So, what happens if Majesto is slain in Barovia?
It would seem that he can't return to the Hells.
Would he reform in Barovia as an imp? If he did, would he still be under contract from his NPC caster?
Would he simply be destroyed as if he had been slain in the Hells?
Would he not reform corporeally, but be a trapped spirit like mortals killed in Barovia?
Could he be 'reborn' as the spirit of a devil in the body of a soul-less Barovian?
If Majesto considers the results of his death undesirable, would he be more cautious in dangerous situations, in the manner of an imp in the Hells?
This question is similar to the related question What happens to a devil that dies in an area warded against planar travel?. However, that question assumes that the area is warded in both directions. Barovia has a number of specific features that are different - the ward is one-way only (creatures can be summoned from other planes to Barovia), Barovia is able to 'hold on to' souls until they are reincarnated, and it has a complicated connection to the ethereal plane and the shadowfell.
The question is also similar to What happens if a Modron dies in Barovia?. However, the imp, unlike the Modron, has a spirit or soul. Further, this question is also about how knowledge of what will happen to it upon its death might affect the imp's behavior.